Skip to content

Commit bd89e44

Browse files
authored
Upload coverage (#107)
1 parent 71467f2 commit bd89e44

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
pip install --upgrade pip wheel
3636
pip install .[test,typehints]
3737
- name: tests
38-
run: pytest --verbose --color=yes
38+
run: coverage run -m pytest --verbose --color=yes
39+
- name: show coverage
40+
run: coverage-rich report
3941
- name: upload coverage
4042
uses: codecov/codecov-action@v3

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ _version.py
77

88
# Testing
99
/.coverage
10-
.pytest_cache/
10+
/coverage.*
11+
/.pytest_cache/
1112

1213
# Docs
1314
/docs/_build/

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ dev = [
2929
]
3030
test = [
3131
'pytest',
32-
'pytest-cov',
32+
'coverage',
33+
'coverage-rich',
34+
'toml', # coverage-rich’s dep anyconfig 0.13 needs this
3335
]
3436
doc = [
3537
'scanpydoc[typehints,theme]',
@@ -89,6 +91,10 @@ python = ['3.9', '3.10', '3.11', '3.12']
8991
features = ['test', 'typehints']
9092
[tool.hatch.envs.test.scripts]
9193
run = 'pytest -vv {args}'
94+
cov = [
95+
'coverage run -m pytest -vv {args}',
96+
'coverage-rich report',
97+
]
9298

9399
[tool.pytest.ini_options]
94100
addopts = [

0 commit comments

Comments
 (0)