From b8c6ebf4c4b9bb6406b948c66b27f40d6e59cb32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Stenstr=C3=B6m?= Date: Sat, 27 Jan 2024 22:04:32 +0100 Subject: [PATCH] Add coverage in CI. Pin to current 94%. --- tox.ini | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8bc63144..45ae2f14 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ python = 3.9: py39-django{32,40,41,42} 3.10: py310-django{32,40,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 [testenv] @@ -54,3 +54,13 @@ changedir = {toxinidir} deps = isort commands = 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 +