From a4fb3c0f883bea4d58d3d7340a1e91257ab79041 Mon Sep 17 00:00:00 2001 From: Alexander Saprykin Date: Thu, 14 Nov 2024 17:00:24 +0100 Subject: [PATCH] Fix coverage reporting (#311) --- Makefile | 4 ++-- pyproject.toml | 8 ++++++++ setup.cfg | 5 ----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 14eb2dcd..bf1bcddc 100644 --- a/Makefile +++ b/Makefile @@ -23,11 +23,11 @@ test: lint test/unit test/functional .PHONY: test/unit test/unit: - pytest tests/unit --cov=galaxy_importer --cov-branch --cov-report xml:coverage.xml + pytest tests/unit --cov=galaxy_importer --cov-config=pyproject.toml --cov-report xml:coverage.xml .PHONY: test/unit/annotate test/unit/annotate: - pytest tests/unit --cov=galaxy_importer --cov-branch --cov-report annotate + pytest tests/unit --cov=galaxy_importer --cov-config=pyproject.toml --cov-report annotate .PHONY: test/unit/annotate/clean test/unit/annotate/clean: diff --git a/pyproject.toml b/pyproject.toml index 14b2cdf2..dbffc211 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,3 +8,11 @@ [tool.ruff] line-length = 100 + +[tool.coverage.run] +relative_files = true +branch = true + +[tool.coverage.report] +fail_under = 95.50 +precision = 2 diff --git a/setup.cfg b/setup.cfg index 82a36b85..b6214fd6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,8 +47,3 @@ galaxy_importer = ansible_test/container/Dockerfile ansible_test/container/entrypoint.sh ansible_test/container/eda/tox.ini - - -[coverage:report] -fail_under = 95.50 -precision = 2