python-test: a demo python repository with GitHub actions for code quality
Live status:
Tooling
Python Continuous Integration with GitHub Actions demo
This minimal example is to show how to setup a python project directory, tooling and github actions to achieve an enforcement of code quality:
- all the code is laocated under the python_actions directory, with each subdirectory being a package, and under it one or more module files, each containing one or more functions/classes
- Code is formatted with black and linted with pylint
- all the tests are found under the tests directory to be picked up by pytest and each test imports the needed modules and functions.
- pytest with pytest-cov will also perform a coverage test to be sent to Codecov
- the workflows automating all of this are in the .github/workflows directory and are triggered by a push or by a pull request to the master branch.
- pre-commit hooks can run more or less the same checks on the local repository
- the only (local) prerequisites are pyenv and poetry
- setup.cfg contains parameter for mypy, pydantic and flake8
- poetry.toml contains options for poetry
- pyproject.toml contains options for