Skip to content

Commit a2f2d61

Browse files
committed
maint: exclude tests from codecoverage config
1 parent 8cfc952 commit a2f2d61

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
7474
- name: pytest
7575
run: |
76-
pytest --cov=batchspawner
76+
pytest
7777
7878
# GitHub action reference: https://github.com/codecov/codecov-action
7979
- uses: codecov/codecov-action@v3

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,21 @@ target_version = [
4242
# ref: https://docs.pytest.org/en/stable/
4343
#
4444
[tool.pytest.ini_options]
45-
addopts = "--verbose --color=yes --durations=10"
45+
addopts = "--verbose --color=yes --durations=10 --cov=batchspawner"
4646
asyncio_mode = "auto"
4747
testpaths = ["batchspawner/tests"]
4848

4949

50+
# pytest-cov / coverage is used to measure code coverage of tests
51+
#
52+
# ref: https://coverage.readthedocs.io/en/stable/config.html
53+
#
54+
[tool.coverage.run]
55+
omit = [
56+
"batchspawner/tests/*",
57+
]
58+
59+
5060
# tbump is used to simplify and standardize the release process when updating
5161
# the version, making a git commit and tag, and pushing changes.
5262
#

0 commit comments

Comments
 (0)