From f9b4c3effc6d19977f8e6328dcebd65a1cab6598 Mon Sep 17 00:00:00 2001 From: Christophe VG Date: Mon, 1 Apr 2024 17:14:30 +0200 Subject: [PATCH] moved all omission config of coverage to pyproject --- .github/workflows/test.yaml | 2 +- Makefile | 1 + pypi_template/templates/(dot)github/workflows/test.yaml | 2 +- pypi_template/templates/Makefile | 1 + pypi_template/templates/tox.ini | 2 +- pyproject.toml | 4 ++-- tox.ini | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a0fa7c5..aba0b45 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ jobs: ruff check --output-format=github --target-version=py38 . - name: Test with PyTest and generate coverage report run: | - coverage run -m --omit="*/.tox/*,*/distutils/*,tests/*" pytest + coverage run pytest coverage lcov - name: Coveralls uses: coverallsapp/github-action@v2 diff --git a/Makefile b/Makefile index 1b60004..7342261 100644 --- a/Makefile +++ b/Makefile @@ -93,6 +93,7 @@ test: env-test lint coverage: test coverage report + coverage lcov lint: env-test ruff check --target-version=$(RUFF_PYTHON_VERSION) . diff --git a/pypi_template/templates/(dot)github/workflows/test.yaml b/pypi_template/templates/(dot)github/workflows/test.yaml index 0da4772..3eb050a 100644 --- a/pypi_template/templates/(dot)github/workflows/test.yaml +++ b/pypi_template/templates/(dot)github/workflows/test.yaml @@ -29,7 +29,7 @@ jobs: ruff check --output-format=github --target-version=py38 . - name: Test with PyTest and generate coverage report run: | - coverage run -m --omit="*/.tox/*,*/distutils/*,tests/*" pytest + coverage run pytest coverage lcov - name: Coveralls uses: coverallsapp/github-action@v2 diff --git a/pypi_template/templates/Makefile b/pypi_template/templates/Makefile index 1b60004..7342261 100644 --- a/pypi_template/templates/Makefile +++ b/pypi_template/templates/Makefile @@ -93,6 +93,7 @@ test: env-test lint coverage: test coverage report + coverage lcov lint: env-test ruff check --target-version=$(RUFF_PYTHON_VERSION) . diff --git a/pypi_template/templates/tox.ini b/pypi_template/templates/tox.ini index 563de0a..3e1cdca 100644 --- a/pypi_template/templates/tox.ini +++ b/pypi_template/templates/tox.ini @@ -14,4 +14,4 @@ deps = pytest coverage commands = - coverage run -m --omit="*/.tox/*,*/distutils/*,tests/*" pytest {posargs} + coverage run -m pytest {posargs} diff --git a/pyproject.toml b/pyproject.toml index bd68449..bfce968 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ extend-exclude = [ "pypi_template/templates", "docs" ] [tool.coverage.run] -omit = [ "*/templates/*" ] +omit = [ "*/templates/*", "*/.tox/*", "*/distutils/*", "tests/*" ] [tool.coverage.report] -omit = [ "*/templates/*" ] +omit = [ "*/templates/*", "*/.tox/*", "*/distutils/*", "tests/*" ] diff --git a/tox.ini b/tox.ini index 563de0a..3e1cdca 100644 --- a/tox.ini +++ b/tox.ini @@ -14,4 +14,4 @@ deps = pytest coverage commands = - coverage run -m --omit="*/.tox/*,*/distutils/*,tests/*" pytest {posargs} + coverage run -m pytest {posargs}