Skip to content

Commit 0a07af9

Browse files
committed
use hatch in CI
1 parent 3c3efff commit 0a07af9

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,29 @@ jobs:
4848
- uses: astral-sh/setup-uv@v7
4949
with:
5050
python-version: ${{ matrix.env.python-version }}
51-
- name: dependencies
52-
# TODO: remove typer constraint after fixing https://github.com/WaylonWalker/coverage-rich/issues/4
53-
run: uv pip install --system .[test,typehints,myst] coverage-rich 'typer <0.14' 'anyconfig[toml] >=0.14'
54-
- name: tests
55-
run: coverage run -m pytest --verbose --color=yes
56-
- name: show coverage
57-
run: coverage-rich report
51+
- name: Install dependencies
52+
run: |
53+
uv tool install hatch
54+
hatch -v env create ${{ matrix.env.name }}
55+
- name: Run tests
56+
run: |
57+
hatch run ${{ matrix.env.name }}:run-cov -v --color=yes -n auto
58+
hatch run ${{ matrix.env.name }}:cov-combine
59+
hatch run ${{ matrix.env.name }}:coverage xml
5860
- name: upload coverage
61+
if: ${{ !cancelled() }}
5962
uses: codecov/codecov-action@v5
6063
with:
64+
token: c66a2830-d3c7-4ae7-a230-21aef89dcf65
65+
flags: ${{ matrix.env.name }}
6166
fail_ci_if_error: true
67+
- name: Upload test results
68+
if: ${{ !cancelled() }}
69+
uses: codecov/test-results-action@v1
70+
with:
6271
token: c66a2830-d3c7-4ae7-a230-21aef89dcf65
72+
flags: ${{ matrix.env.name }}
73+
fail_ci_if_error: true
6374

6475
check:
6576
if: always()

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ filterwarnings = [
117117

118118
[tool.coverage.run]
119119
source_pkgs = ['scanpydoc']
120+
concurrency = [ "multiprocessing" ]
121+
parallel = true
120122
[tool.coverage.paths]
121123
scanpydoc = ['src/scanpydoc']
122124
[tool.coverage.report]

0 commit comments

Comments
 (0)