From 8b498b03006a4f94dd4614cb393c71b1518f95c2 Mon Sep 17 00:00:00 2001 From: Markus Bilz Date: Mon, 2 Dec 2024 11:17:38 +0100 Subject: [PATCH] =?UTF-8?q?ci:=20fix=20coverage=20report=20generation?= =?UTF-8?q?=F0=9F=94=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/action_python.yaml | 4 ++-- pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/action_python.yaml b/.github/workflows/action_python.yaml index 6a2fd559..c57958a9 100644 --- a/.github/workflows/action_python.yaml +++ b/.github/workflows/action_python.yaml @@ -35,8 +35,8 @@ jobs: run: uv sync --all-extras --dev - name: Test with pytest run: | - uv run pytest --cov=src tests/ --doctest-modules --junitxml=cover/xunit-result.xml --cov-report xml:cover/coverage.xml - uv run coverage json -o cover/coverage.json + uv run pytest --cov=src tests/ --junitxml=cover/xunit-result.xml --cov-report xml:cover/coverage.xml + uv run coverage json cover/xunit-result.xml coverage.json - name: "Extract numbers from cov report" run: | export TOTAL=$(python -c "import json;print(json.load(open('cover/coverage.json'))['totals']['percent_covered_display'])") diff --git a/pyproject.toml b/pyproject.toml index 5ce2b28d..24c822e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,7 +127,7 @@ dev-dependencies = [ "mypy>=1.7.1", "pre-commit>=3.5.0", "pytest>=7.4.3", - "pytest-cov>=4.1.0", + "pytest-cov", "ruff>=0.8.1", "tox>=4.23", "tox-uv", diff --git a/uv.lock b/uv.lock index 01d4ff00..8d599ede 100644 --- a/uv.lock +++ b/uv.lock @@ -2192,7 +2192,7 @@ dev = [ { name = "mypy", specifier = ">=1.7.1" }, { name = "pre-commit", specifier = ">=3.5.0" }, { name = "pytest", specifier = ">=7.4.3" }, - { name = "pytest-cov", specifier = ">=4.1.0" }, + { name = "pytest-cov" }, { name = "ruff", specifier = ">=0.8.1" }, { name = "tox", specifier = ">=4.23" }, { name = "tox-uv" },