Add tox configuration

Tox manages test environments for all supported Python versions, as
well as linting and formatting tools. On GitHub, the test and lint
steps are kept as close as possible to the Makefile equivalents.
This commit is contained in:
Martijn Pieters
2023-05-15 15:20:53 +01:00
parent 2eabc49d24
commit 0e9a8baeb2
5 changed files with 195 additions and 25 deletions

View File

@@ -32,11 +32,7 @@ jobs:
- name: Install linting requirements
run: poetry install --no-root --with=linting --all-extras
- name: Execute linters
run: |
poetry run black --check --diff .
poetry run flake8
poetry run mypy
poetry run pyright
run: make lint
test:
needs:
@@ -59,11 +55,10 @@ jobs:
cache: poetry
- name: Install testing requirements
run: |
poetry install --no-root --with=dev --all-extras
poetry install --no-root --all-extras
poetry run pip install tox-gh-actions
- name: Execute tests
env:
PYTHONDEVMODE: '1'
run: poetry run pytest
run: poetry run tox
test-summary:
name: Test matrix status