Skip to content

fizyk/actions-reuse

Repository files navigation

actions-reuse

Set of reusable github actions workflows

pr-check

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]
Configuration
parameter default note
python-version 3.13 Python version to use in the workflow

pre-commit

Checks Pull Request against manual enabled pre-commit hooks.

jobs:
  build:
    uses: fizyk/actions-reuse/.github/workflows/[email protected]
Configuration
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]

pypi

jobs:
  build:
    uses: fizyk/actions-reuse/.github/workflows/[email protected]
Configuration
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
Configuration
secret note
pypi_token Pypi token used to authenticate with PyPI for upload.

tests-pytests

jobs:
  tests:
    uses: fizyk/actions-reuse/.github/workflows/[email protected]

Run pytest tests on python code

Configuration
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.
Configuration
secret required note
codecov_token no Codecov token

automerge

jobs:
  automerge:
    uses: fizyk/actions-reuse/.github/workflows/[email protected]

Runs automerge for dependabot pull requests using:

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!

Configuration
secret note
app_id Github Application ID that'll be used for merging
private_key Github Application's private key

Python versions

Available python versions can be checked in https://github.com/actions/python-versions?tab=readme-ov-file#python-for-actions repository.

Release

Install pipenv first,

Then run:

pipenv run tbump [NEW_VERSION]

About

Github actions to be reused across projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •