Skip to content

Commit 7478a04

Browse files
committed
docs(ci): add coverage and codecov upload
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
1 parent 5cfb206 commit 7478a04

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage:
2+
status:
3+
project: off
4+
patch: off

.github/workflows/test_and_release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ jobs:
6060
run: |
6161
pip install .
6262
pip install -r tests/requirements.txt
63-
pytest -s ./tests
63+
# Run the tests with coverage so we get a coverage report too
64+
pip install coverage
65+
coverage run --source . -m pytest .
66+
# Print the coverage report
67+
coverage report -m
68+
69+
- name: Upload Coverage to Codecov
70+
uses: codecov/codecov-action@v3
6471

6572
test-npm-build:
6673
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)