A collection of github workflows for reuse. Some of the workflow files assume that files will exist in the original directory and will fail if they do not exist.
python-version
: default 3.9; the version of python to use
None
None
requirements.txt
file at root level; specify packages needed by code to be lintedrequirements-lint.txt
file at root level; specify versions of pylint and pyright for linting. Example:
pylint==2.15.4
pyright==1.1.276
jobs:
lint:
uses: seamuslowry/workflows/.github/workflows/lint_python.yml@main
release-version
: required; the version to releaserepo
: defaultpypi
; what repo to publish the release topython-version
: default 3.9; the version of python to use
py_pi_token
: required; the API token to use to publish
None
requirements.txt
file at root level; specify packages needed by code to be lintedrequirements-publish.txt
file at root level; specify versions of build and twine for publishing
build==0.8.0
twine==4.0.1
jobs:
publish:
uses: seamuslowry/workflows/.github/workflows/publish_python.yml@main
with:
repo: testpypi
release-version: 0.0.1
compose-file: docker-compose.yml
secrets:
py_pi_token: ${{ secrets.TEST_PYPI_API_TOKEN }}
min-coverage
: default 100; minimum percentage of code must be coveragepython-version
: default 3.9; the version of python to usecompose-file
: not required; expects a docker compose file; if passed, will build and up the file before tests and bring it down after
None
None
requirements.txt
file at root level; specify packages needed by code to be lintedrequirements-test.txt
file at root level; specify versions of pytest and coverage for testing and coverage
pytest==7.1.3
coverage==6.5.0
jobs:
test:
uses: seamuslowry/workflows/.github/workflows/test_python.yml@main
with-v
: default false; whether to include v in tag versiondry-run
: default false; generate the next tag value but do not create the tagcustom-tag
: custom tag value to use; other tag related settings get ignored
gh_token
: the GITHUB_TOKEN secret so it can create a tag
tag
: the semantic version string of the created tag
None
jobs:
tag-new-version:
uses: seamuslowry/workflows/.github/workflows/tag.yml@main
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}
name
: the name of the functions app to deploy topath
: default "."; the path to the project to deploypython-version
: default 3.9; the version of python to use
azure_publish_profile
: the publish profile from azure to use; will include the deployment slot, if applicable
None
requirements.txt
file at root level; specify packages needed by code to be published
jobs:
deploy:
uses: seamuslowry/workflows/.github/workflows/deploy_python_functions.yml@main
with:
name: appname
secrets:
azure_publish_profile: ${{ secrets.AZURE_PROD_PUBLISH }}
reporter
: passthrough to reporter of reviewdog. Usegithub-pr-review
when run on PR actions and want to leave a review. Usegithub-check
when running on push/merge and don't want a PR review.
gh_token
: the GITHUB_TOKEN secret so it can report
None
None
jobs:
lint:
uses: seamuslowry/workflows/.github/workflows/lint_actions.yml@main
with:
reporter: github-check
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}