Set of reusable github actions workflows
Checks Pull Request for the added towncrier newsfragment if PR is not performed by a bot, and every Pull Request if tbump is correctly configured according to new codebase.
jobs:
build:
uses: fizyk/actions-reuse/.github/workflows/[email protected]
parameter | default | note |
---|---|---|
python-version | 3.13 | Python version to use in the workflow |
Checks Pull Request against manual enabled pre-commit hooks.
jobs:
build:
uses: fizyk/actions-reuse/.github/workflows/[email protected]
parameter | default | note |
---|---|---|
python-version | 3.13 | Python version to use in the workflow |
To configure pre-commit hooks to be run with this workflow, add stages parameter:
- repo: local
hooks:
- id: pipenv
stages: [pre-commit, manual]
jobs:
build:
uses: fizyk/actions-reuse/.github/workflows/[email protected]
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:
tests:
uses: fizyk/actions-reuse/.github/workflows/[email protected]
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/[email protected]
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 |
Available python versions can be checked in https://github.com/actions/python-versions?tab=readme-ov-file#python-for-actions repository.
Install pipenv first,
Then run:
pipenv run tbump [NEW_VERSION]