Skip to content

Commit 747d492

Browse files
Remove Coverage from tests
See DiamondLightSource/cothread#73 The simplest solution seems to be to just remove coverage.
1 parent 3d67a3c commit 747d492

2 files changed

Lines changed: 4 additions & 20 deletions

File tree

‎.github/workflows/code.yml‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,14 @@ jobs:
5858

5959

6060
include:
61-
# Put coverage and results files in the project directory for mac
61+
# Put results files in the project directory for mac
6262
- os: macos-15-intel
63-
cov_file: "{project}/dist/coverage.xml"
6463
results_file: "{project}/dist/pytest-results.xml"
6564
# And for windows
6665
- os: windows-latest
67-
cov_file: "{project}/dist/coverage.xml"
6866
results_file: "{project}/dist/pytest-results.xml"
69-
# But put coverage and results files in the output dir mounted in docker for linux
67+
# But put results files in the output dir mounted in docker for linux
7068
- os: ubuntu-latest
71-
cov_file: /output/coverage.xml
7269
results_file: /output/pytest-results.xml
7370

7471
exclude:
@@ -112,9 +109,9 @@ jobs:
112109
# cibuildwheel reports it cannot clean up the temp dir used for testing,
113110
# and fails the build. Sleeping seems to give pytest enough time to
114111
# fully clean up.
115-
CIBW_TEST_COMMAND: pytest {project}/tests --cov-report xml:${{ matrix.cov_file }} --junit-xml=${{ matrix.results_file }} && sleep 2
112+
CIBW_TEST_COMMAND: pytest {project}/tests --junit-xml=${{ matrix.results_file }} && sleep 2
116113
# Run with faulthandler and -s in the hope we get a stack trace on seg fault on windows...
117-
CIBW_TEST_COMMAND_WINDOWS: python -X faulthandler -m pytest -s {project}/tests --cov-report xml:${{ matrix.cov_file }} --junit-xml=${{ matrix.results_file }}
114+
CIBW_TEST_COMMAND_WINDOWS: python -X faulthandler -m pytest -s {project}/tests --junit-xml=${{ matrix.results_file }}
118115
# Disable auditwheel as it isn't compatible with setuptools_dso approach
119116
# https://github.com/mdavidsaver/setuptools_dso/issues/17
120117
CIBW_REPAIR_WHEEL_COMMAND: ""
@@ -130,12 +127,6 @@ jobs:
130127
name: dist-${{ matrix.os }}-${{ matrix.python }}
131128
path: dist/softioc*
132129

133-
- name: Upload coverage to Codecov
134-
uses: codecov/codecov-action@v4
135-
with:
136-
name: ${{ matrix.os }}/${{ matrix.python }}
137-
directory: dist
138-
139130
test-sdist:
140131
needs: [sdist]
141132
strategy:

‎setup.cfg‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ useful =
4848
dev =
4949
# Pytest 9.1.0 deprecates some APIs that some of our plugins require
5050
pytest<9.1.0
51-
pytest-cov
5251
pytest-flake8
5352
# Flake8 5.0 starts printing error, so pin to avoid it:
5453
# AttributeError: module 'flake8.options.config' has no attribute 'ConfigFileFinder'
@@ -77,12 +76,6 @@ extend-ignore =
7776
# Don't do flake8 here as we need to separate it out for CI
7877
addopts =
7978
--tb=native -vv --doctest-modules --ignore=softioc/iocStats --ignore=epicscorelibs --ignore=docs
80-
--cov=softioc --cov-report term --cov-report xml:cov.xml
8179
# Enables all discovered async tests and fixtures to be automatically marked as async, even if
8280
# they don't have a specific marker https://github.com/pytest-dev/pytest-asyncio#auto-mode
8381
asyncio_mode = auto
84-
85-
[coverage:run]
86-
# This is covered in the versiongit test suite so exclude it here
87-
omit = */_version_git.py
88-
patch = subprocess

0 commit comments

Comments
 (0)