Skip to content

Commit 62a2727

Browse files
committed
test run
1 parent dae9253 commit 62a2727

File tree

4 files changed

+50
-6
lines changed

4 files changed

+50
-6
lines changed

.codecov.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Based on pydata/xarray/anndata/scanpy
2+
codecov:
3+
require_ci_to_pass: false
4+
5+
coverage:
6+
status:
7+
project:
8+
default:
9+
# Require 75% coverage
10+
target: 75
11+
changes: false
12+
13+
comment:
14+
layout: "diff, flags, files"
15+
behavior: once
16+
require_base: false

.github/workflows/test-gpu.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,31 @@ jobs:
8888

8989
- name: Run tests
9090
run: |
91+
mkdir -p test-data
9192
if [[ "${{ matrix.env.name }}" == *"stable"* ]]; then
92-
uvx hatch run ${{ matrix.env.name }}:run-cov
93+
uvx hatch run ${{ matrix.env.name }}:run-cov -v --color=yes --junitxml=test-data/test-results.xml
94+
uvx hatch run ${{ matrix.env.name }}:cov-combine
95+
uvx hatch run ${{ matrix.env.name }}:coverage xml
96+
uvx hatch run ${{ matrix.env.name }}:cov-report
9397
else
94-
uvx hatch run ${{ matrix.env.name }}:run
98+
uvx hatch run ${{ matrix.env.name }}:run -v --color=yes
9599
fi
96100
97-
- name: Upload coverage to Codecov
101+
- name: Upload test results
102+
if: ${{ !cancelled() && contains(matrix.env.name, 'stable') }}
103+
uses: codecov/codecov-action@v5
104+
with:
105+
report_type: test_results
106+
files: test-data/test-results.xml
107+
use_oidc: true
108+
fail_ci_if_error: false
109+
110+
- name: Upload coverage data
98111
if: contains(matrix.env.name, 'stable')
99112
uses: codecov/codecov-action@v5
100113
with:
101-
files: coverage.xml
114+
files: test-data/coverage.xml
115+
use_oidc: true
102116
fail_ci_if_error: false
103117

104118
test-prerelease:

hatch.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ features = [ "dev" ]
55
[envs.hatch-test]
66
default-args = [ ]
77
features = [ "test" ]
8-
scripts.run = "pytest"
9-
scripts.run-cov = "pytest --cov=rapids_singlecell --cov-report=xml --cov-report=term"
108

119
# Select CUDA feature per matrix
1210
overrides.matrix.cuda.features = [

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,19 @@ packages = [ 'src/rapids_singlecell', 'src/testing' ]
136136
[tool.codespell]
137137
skip = '*.ipynb,*.csv'
138138
ignore-words-list = "nd"
139+
140+
[tool.coverage.run]
141+
data_file = "test-data/coverage"
142+
source_pkgs = [ "rapids_singlecell" ]
143+
omit = [ "tests/*", "src/testing/*" ]
144+
145+
[tool.coverage.xml]
146+
output = "test-data/coverage.xml"
147+
148+
[tool.coverage.paths]
149+
source = [ "./src", "**/site-packages" ]
150+
151+
[tool.coverage.report]
152+
exclude_also = [
153+
"if TYPE_CHECKING:",
154+
]

0 commit comments

Comments
 (0)