From 54a2c1a5c72df38f433fc212467b2547581c560f Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Jul 01 2023 15:50:45 +0000 Subject: Improve tox config Following my current patterns - only a single 'CI' environment. Signed-off-by: Adam Williamson --- diff --git a/pyproject.toml b/pyproject.toml index 07fda21..744cd7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [tool.coverage.run] parallel = true branch = true -source = ["wikitcms", "src/wikitcms"] +source_pkgs = ["wikitcms"] [tool.coverage.paths] source = ["src", ".tox/**/site-packages"] diff --git a/tests.requires b/tests.requires index c9d2dd7..3f0ecd2 100644 --- a/tests.requires +++ b/tests.requires @@ -1,2 +1,3 @@ +coverage[toml] pytest openidc_client diff --git a/tox.ini b/tox.ini index 075fec8..827433c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,20 +1,21 @@ [tox] -envlist = py{36,37,38,39,310}-ci +envlist = py36,py38,py39,py310,py311,coverage-report skip_missing_interpreters = true isolated_build = true - [testenv] deps = -r{toxinidir}/install.requires -r{toxinidir}/tests.requires - ci: -r{toxinidir}/ci.requires - commands = - py.test - ci: coverage run -m pytest {posargs} - ci: coverage combine - ci: coverage report - ci: coverage xml - ci: diff-cover coverage.xml --fail-under=90 - ci: diff-quality --violations=pylint --fail-under=90 - ci: black src/ tests/ --check + coverage run -m pytest {posargs} +[testenv:coverage-report] +deps = -r{toxinidir}/ci.requires +ignore_errors = true +skip_install = true +commands = + black --check src/ tests/ + coverage combine + coverage report + coverage xml + diff-cover coverage.xml --fail-under=90 + diff-quality --violations=pylint --fail-under=90