Add coverage in CI. Pin to current 94%.

This commit is contained in:
Emil Stenström 2024-01-27 22:04:32 +01:00
parent 084a06fad8
commit b8c6ebf4c4

12
tox.ini
View file

@ -24,7 +24,7 @@ python =
3.9: py39-django{32,40,41,42} 3.9: py39-django{32,40,41,42}
3.10: py310-django{32,40,41,42,50} 3.10: py310-django{32,40,41,42,50}
3.11: py311-django{41,42,50} 3.11: py311-django{41,42,50}
3.12: py312-django{42,50}, flake8, isort 3.12: py312-django{42,50}, flake8, isort, coverage, mypy
fail_on_no_env = True fail_on_no_env = True
[testenv] [testenv]
@ -54,3 +54,13 @@ changedir = {toxinidir}
deps = isort deps = isort
commands = commands =
isort --check-only --diff django_components isort --check-only --diff django_components
[testenv:coverage]
# Note: Settings for coverage exists in the setup.cfg file
changedir = {toxinidir}
deps =
pytest-coverage
commands =
coverage run --branch -m pytest
coverage report -m --fail-under=94