Skip to content

Commit f95b548

Browse files
flying-sheepmeeseeksmachine
authored andcommitted
Backport PR scverse#3797: ci: fix coverage
1 parent a2903c5 commit f95b548

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,23 @@ jobs:
7575
run: uvx hatch run ${{ matrix.env.name }}:run
7676
- name: Run tests (coverage)
7777
if: matrix.env.test-type == 'coverage'
78+
env:
79+
COVERAGE_PROCESS_START: ${{ github.workspace }}/pyproject.toml
7880
run: |
7981
uvx hatch run ${{ matrix.env.name }}:run-cov
80-
uvx hatch run ${{ matrix.env.name }}:coverage combine
82+
uvx hatch run ${{ matrix.env.name }}:cov-combine
8183
uvx hatch run ${{ matrix.env.name }}:coverage xml
8284
8385
- name: Upload coverage data
86+
if: ${{ !cancelled() }} && matrix.env.test-type == 'coverage'
8487
uses: codecov/codecov-action@v5
85-
if: matrix.env.test-type == 'coverage'
8688
with:
8789
token: ${{ secrets.CODECOV_TOKEN }}
8890
env_vars: ENV_NAME
8991
fail_ci_if_error: true
9092
files: test-data/coverage.xml
9193

9294
- name: Upload test results
93-
# yaml strings can’t start with “!”, so using explicit substitution
9495
if: ${{ !cancelled() }}
9596
uses: codecov/test-results-action@v1
9697
with:

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,15 @@ filterwarnings = [
194194
]
195195

196196
[tool.coverage.run]
197-
data_file = "test-data/coverage"
197+
data_file = "test-data/raw-coverage"
198198
source_pkgs = [ "scanpy" ]
199199
omit = [ "tests/*", "src/testing/*" ]
200200
concurrency = [ "multiprocessing" ]
201-
parallel = "true"
201+
parallel = true
202202
[tool.coverage.xml]
203203
output = "test-data/coverage.xml"
204204
[tool.coverage.paths]
205-
source = [ ".", "**/site-packages" ]
205+
source = [ "src", "**/site-packages" ]
206206
[tool.coverage.report]
207207
exclude_also = [
208208
"if __name__ == .__main__.:",

0 commit comments

Comments
 (0)