From c8ca42b9fc7824b215f3d588a17cc314956a7fda Mon Sep 17 00:00:00 2001 From: Philipp A Date: Fri, 20 Oct 2023 13:00:55 +0200 Subject: [PATCH] Fix coverage (#9) --- .github/workflows/ci.yml | 3 ++- pyproject.toml | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e505245..27d50c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,10 +25,11 @@ jobs: cache: pip - run: | pip install -U pip - pip install .[test] + pip install -e .[test] - run: | coverage run -m pytest coverage xml + coverage-rich report - uses: codecov/codecov-action@v3 with: fail_ci_if_error: true diff --git a/pyproject.toml b/pyproject.toml index 82f2386..3176476 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,12 @@ classifiers = [ ] dependencies = [] [project.optional-dependencies] -test = ["pytest", "coverage"] +test = [ + "pytest", + "coverage", + "coverage-rich", + "toml", # coverage-rich’s dep anyconfig needs this to load the config +] [tool.black] line-length = 100 @@ -66,7 +71,7 @@ packages = ["src/legacy_api_wrap", "src/testing/legacy_api_wrap"] features = ["test"] [tool.hatch.envs.test.scripts] run = "pytest {args}" -cov = "coverage run -m pytest {args} && coverage report && coverage html" +cov = "coverage run -m pytest {args} && coverage-rich report && coverage html" [[tool.hatch.envs.test.matrix]] python = ["3.8", "3.9", "3.10", "3.11"]