diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d255f68..cda6496 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: uses: ./.github/workflows/tox.yml with: default_python: "3.10" - jobs_producing_coverage: 0 + jobs_producing_coverage: 6 max_python: "3.13" min_python: "3.10" run_post: echo 'Running post' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f61a244 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,12 @@ +[tool.coverage.report] +exclude_also = ["pragma: no cover", "if TYPE_CHECKING:"] +show_missing = true +skip_empty = true + +[tool.coverage.run] +concurrency = ["multiprocessing", "thread"] +# Do not use branch until bug is fixes: +# https://github.com/nedbat/coveragepy/issues/605 +# branch = true +parallel = true +source = ["test"] diff --git a/requirements.in b/requirements.in index e034800..f1d51ec 100644 --- a/requirements.in +++ b/requirements.in @@ -3,3 +3,5 @@ cairosvg markdown-include mkdocs-ansible mkdocs-exclude +coverage>=7.6.7 +pytest>=8 diff --git a/src/devtools/__init__.py b/src/devtools/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_one.py b/test/test_one.py new file mode 100644 index 0000000..b16a0a8 --- /dev/null +++ b/test/test_one.py @@ -0,0 +1,5 @@ +"""Test module for the package.""" + + +def test_placeholder(): + """Placeholder test.""" diff --git a/tox.ini b/tox.ini index 5233043..2438efb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -minversion = 4.0 +minversion = 4.6.3 envlist = lint docs @@ -7,14 +7,27 @@ envlist = ubi9 isolated_build = True requires = - tox>=4.21.2 - tox-uv>=1.15.0 + tox>=4.21.2 + tox-uv >= 1.16.0 [testenv] commands = -skip_install = true + coverage run -m pytest {posargs:\ + -n auto \ + -ra \ + --showlocals \ + --doctest-modules \ + --durations=10 \ + } + {py,py310,py311,py312,py313}: sh -c "coverage combine -a -q --data-file={envdir}/.coverage {toxworkdir}/*/.coverage.* && coverage xml --data-file={envdir}/.coverage -o {envdir}/coverage.xml --fail-under=0" +setenv = + COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}} + COVERAGE_PROCESS_START={toxinidir}/pyproject.toml +skip_install = false usedevelop = false changedir = {toxinidir} +allowlist_externals = + sh [testenv:docs] description = Build docs