Skip to content

Commit 6c72742

Browse files
authored
ci: fix coverage (#3797)
1 parent e3c1b66 commit 6c72742

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
@@ -187,15 +187,15 @@ filterwarnings = [
187187
]
188188

189189
[tool.coverage.run]
190-
data_file = "test-data/coverage"
190+
data_file = "test-data/raw-coverage"
191191
source_pkgs = [ "scanpy" ]
192192
omit = [ "tests/*", "src/testing/*" ]
193193
concurrency = [ "multiprocessing" ]
194-
parallel = "true"
194+
parallel = true
195195
[tool.coverage.xml]
196196
output = "test-data/coverage.xml"
197197
[tool.coverage.paths]
198-
source = [ ".", "**/site-packages" ]
198+
source = [ "src", "**/site-packages" ]
199199
[tool.coverage.report]
200200
exclude_also = [
201201
"if __name__ == .__main__.:",

0 commit comments

Comments
 (0)