| # Define which python envirnments tox should test against | |
| [tox] | |
| envlist = py38, py39, py310 | |
| isolated_build = True | |
| # Here we map Github Actions Python versions to tox environment | |
| [gh-actions] | |
| python = | |
| 3.8: py38 | |
| 3.9: py39 | |
| 3.10: py310 | |
| [testenv] | |
| deps = -rrequirements_dev.txt | |
| commands = | |
| # Runs flake8 to report syntax errors & undefined names | |
| flake8 dynamicts --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # Runs flake8 again to report all issues but exit with 0 (won’t fail build) | |
| flake8 dynamicts --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| # Runs static type checking with mypy on dynamicts package | |
| ; mypy dynamicts | |
| # Runs unit tests in verbose mode using pytest. | |
| pytest -v tests/unit | |
| pytest -v tests/integration |