Skip to content

fizyk/actions-reuse

Repository files navigation

actions-reuse

Set of reusable github actions workflows

pypi

jobs:
  build:
    uses: fizyk/actions-reuse/.github/workflows/pypi.yml@v2.4.7
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.

linters-python

jobs:
  lint:
    uses: fizyk/actions-reuse/.github/workflows/linters-python.yml@v2.4.7

Lints python code

Configuration
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

tests-pytests

jobs:
  tests:
    uses: fizyk/actions-reuse/.github/workflows/tests-pytests.yml@v2.4.7

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-shared

jobs:
  automerge:
    uses: fizyk/actions-reuse/.github/workflows/automerge-shared.yml@v2.4.7

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

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