Skip to content

Commit

Permalink
moved all omission config of coverage to pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
christophevg committed Apr 1, 2024
1 parent 9441d0f commit f9b4c3e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ test: env-test lint

coverage: test
coverage report
coverage lcov

lint: env-test
ruff check --target-version=$(RUFF_PYTHON_VERSION) .
Expand Down
2 changes: 1 addition & 1 deletion pypi_template/templates/(dot)github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions pypi_template/templates/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ test: env-test lint

coverage: test
coverage report
coverage lcov

lint: env-test
ruff check --target-version=$(RUFF_PYTHON_VERSION) .
Expand Down
2 changes: 1 addition & 1 deletion pypi_template/templates/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ deps =
pytest
coverage
commands =
coverage run -m --omit="*/.tox/*,*/distutils/*,tests/*" pytest {posargs}
coverage run -m pytest {posargs}
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*" ]
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ deps =
pytest
coverage
commands =
coverage run -m --omit="*/.tox/*,*/distutils/*,tests/*" pytest {posargs}
coverage run -m pytest {posargs}

0 comments on commit f9b4c3e

Please sign in to comment.