This is a github action to test the native python and dependencies installed in the runner
python -m venv venv
source venv/bin/activate
pip install pip --upgrade
pip install -r dev-requirements.txt
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
A yaml file
python read_key.py --file test.yaml --key title
A json file
python read_key.py --file test.json --key title