christiangda / gha-python-code

This is a github action to test the native python and dependencies installed in the runner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gha-python-code

This is a github action to test the native python and dependencies installed in the runner

Development

Setup

python -m venv venv
source venv/bin/activate
pip install pip --upgrade

pip install -r dev-requirements.txt

Test Files

cat << EOF > test.json
{
 "glossary": {
  "title": "example glossary",
  "GlossDiv": {
   "title": "S",
   "GlossList": {
    "GlossEntry": {
     "ID": "SGML",
     "SortAs": "SGML",
     "GlossTerm": "Standard Generalized Markup Language",
     "Acronym": "SGML",
     "Abbrev": "ISO 8879:1986",
     "GlossDef": {
      "para": "A meta-markup language, used to create markup languages such as DocBook.",
      "GlossSeeAlso": [
       "GML",
       "XML"
      ]
     },
     "GlossSee": "markup"
    }
   }
  }
 }
}
EOF
cat << EOF > test.yaml
---
glossary:
  title: example glossary
  GlossDiv:
    title: S
    GlossList:
      GlossEntry:
        ID: SGML
        SortAs: SGML
        GlossTerm: Standard Generalized Markup Language
        Acronym: SGML
        Abbrev: ISO 8879:1986
        GlossDef:
          para: A meta-markup language, used to create markup languages such as DocBook.
          GlossSeeAlso:
            - GML
            - XML
        GlossSee: markup
EOF

Test

A yaml file

python read_key.py --file test.yaml --key title

A json file

python read_key.py --file test.json --key title

About

This is a github action to test the native python and dependencies installed in the runner

License:Apache License 2.0


Languages

Language:Python 100.0%