Skip to content

Commit eee67ae

Browse files
committed
HUGE REFACTOR: Rename job from 'test' to 'tests' and enhance test matrix for additional modules, improving test organization and coverage reporting
1 parent dd14d3e commit eee67ae

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/tests.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
test:
14+
tests:
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 20
1717

@@ -23,6 +23,21 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
python-version: ["3.12"] # add "3.13" if you want
26+
module:
27+
- name: cli
28+
tests: tests/test_cli.py
29+
- name: export
30+
tests: tests/test_export.py
31+
- name: import
32+
tests: tests/test_import.py
33+
- name: info-read
34+
tests: tests/test_info_read.py
35+
- name: subset
36+
tests: tests/test_subset.py
37+
- name: zarr
38+
tests: tests/test_zarr.py
39+
40+
name: tests (${{ matrix.module.name }})
2641

2742
steps:
2843
- uses: actions/checkout@v4
@@ -42,29 +57,29 @@ jobs:
4257

4358
- name: Run tests with coverage
4459
run: |
45-
uv run pytest -v \
60+
uv run pytest -v ${{ matrix.module.tests }} \
4661
--cov=h5ad \
4762
--cov-report=term-missing \
4863
--cov-report=xml \
4964
--cov-report=html \
50-
--junitxml=pytest-results.xml
65+
--junitxml=pytest-results-${{ matrix.module.name }}.xml
5166
5267
- name: Publish test results summary
5368
uses: EnricoMi/publish-unit-test-result-action@v2
5469
if: always()
5570
with:
56-
files: pytest-results.xml
57-
check_name: Test Results
71+
files: pytest-results-${{ matrix.module.name }}.xml
72+
check_name: Test Results (${{ matrix.module.name }})
5873

5974
- name: Upload coverage artifacts
6075
uses: actions/upload-artifact@v4
6176
if: always()
6277
with:
63-
name: coverage
78+
name: coverage-${{ matrix.module.name }}
6479
path: |
6580
coverage.xml
6681
htmlcov/
67-
pytest-results.xml
82+
pytest-results-${{ matrix.module.name }}.xml
6883
retention-days: 30
6984

7085
- name: Upload coverage to Codecov

0 commit comments

Comments
 (0)