Set of reusable github actions workflows
jobs:
build:
uses: fizyk/actions-reuse/.github/workflows/pypi.yml@v2.4.8
parameter | default | note |
---|---|---|
publish | false | Whether to publish package to pypi or not |
artifact | false | Whether to upload built packages as pipeline artifacts or not |
secret | note |
---|---|
pypi_token | Pypi token used to authenticate with PyPI for upload. |
jobs:
lint:
uses: fizyk/actions-reuse/.github/workflows/linters-python.yml@v2.4.8
Lints python code
parameter | default | note |
---|---|---|
pipenv-install-options | "" | Additional pipenv install options |
cache | true | Whether to cache pythin environment |
requirements | Requirements file name, makes action install requirements with pip instead of default pipenv | |
python-version | 3.11 | Python version to run linters on |
pydocstyle | false | Flag to run pydocstyle on code or not |
pydocstyle-paths | . | Path to run pydocstyle on |
pycodestyle | false | Flag to run pycodestyle on code or not |
pycodestyle-paths | . | Path to run pycodestyle on |
black | false | Flag to run black on code or not |
black-paths | . | Path to run black on |
mypy | false | Flag to run mypy on code or not |
mypy-paths | . | Path to run mypy on |
pylint | false | Flag to run pylint on code or not |
rst | false | Flag to run rst on code or not |
rst-paths | *.rst | Path to run rst-lint on |
rstcheck | false | Flag to run rstcheck on rst file or not |
ruff | false | Flag to run ruff on code or not |
ruff-paths | . | Path to run ruff on |
jobs:
tests:
uses: fizyk/actions-reuse/.github/workflows/tests-pytests.yml@v2.4.8
Run pytest tests on python code
parameter | default | note |
---|---|---|
pipenv-install-options | "" | Additional pipenv install options |
cache | true | Whether to cache pythin environment |
requirements | Requirements file name | |
pytest_opts | "" | Additional pytest options |
python-versions | '["3.7", "3.8", "3.9", "3.10", "3.11"]' | List of python versions matrix to run tests on. It has to be jsonified list. |
os: | ubuntu-latest | Operating system tests are running on |
fail_on_codecov_error: | false | Whether pipeline should fail if there would be an error on codecov side. |
secret | required | note |
---|---|---|
codecov_token | no | Codecov token |
jobs:
automerge:
uses: fizyk/actions-reuse/.github/workflows/automerge-shared.yml@v2.4.8
Runs automerge for dependabot pull requests using:
- ridedott/merge-me-action <https://github.com/ridedott/merge-me-action>_ to run the merge
- tibdex/github-app-token to generate short-lived github app token with enough permissions to run the merge.
Mind that dependabot pull requests are treated as 3rd party pull requests, hence default GITHUB_TOKEN will only have read permissions.
Requires Github application to run!
secret | note |
---|---|
app_id | Github Application ID that'll be used for merging |
private_key | Github Application's private key |
Install pipenv first,
Then run:
pipenv run tbump [NEW_VERSION]