From 5405f10fb281e33ed49ff6db02e1ef26a1f17b37 Mon Sep 17 00:00:00 2001 From: Olivier Boulant Date: Wed, 20 Oct 2021 21:21:29 +0200 Subject: [PATCH] fix: make coverage work --- .github/workflows/run-test.yml | 2 +- pyproject.toml | 1 + setup.cfg | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index f8f6a98f..1a8e8f06 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -50,7 +50,7 @@ jobs: python -m pip install .[test] - name: Test with pytest run: | - python -m pytest --cov-report=xml --cov-report=term:skip-covered --cov=src/ruptures + python -m pytest --cov - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: diff --git a/pyproject.toml b/pyproject.toml index 9c037a7a..a90428af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ build-backend = "setuptools.build_meta" # https://docs.pytest.org/en/stable/customize.html#pyproject-toml [tool.pytest.ini_options] minversion = "6.0" +addopts = "--cov-report=xml --cov-report=term:skip-covered" testpaths = ["tests"] [tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg index c1ad54c2..cb8c9617 100644 --- a/setup.cfg +++ b/setup.cfg @@ -63,4 +63,7 @@ docs = nltk [build_ext] -inplace=1 \ No newline at end of file +inplace=1 + +[coverage:run] +source_pkgs = ruptures \ No newline at end of file