Skip to content

Commit 1c87cb8

Browse files
authored
feat: add ability for codecov to get test healthiness (#218)
* feat: add ability for codecov to get test healthiness * fix: invalid yaml
1 parent 56613b8 commit 1c87cb8

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ jobs:
4141
python -m pip install --upgrade pip
4242
pip install --upgrade -r requirements-dev.txt
4343
pip install .
44-
- name: Unit tests
44+
- name: Test with pytest
4545
run: |
46-
coverage run -m pytest
47-
coverage xml
46+
pytest --cov --junitxml=junit.xml
4847
- name: Upload coverage to Codecov
4948
uses: codecov/codecov-action@v4
5049
with:
51-
fail_ci_if_error: true # optional (default = false)
52-
name: codecov-umbrella # optional
53-
token: ${{ secrets.CODECOV_TOKEN }} # required
54-
verbose: true # optional (default = false)
50+
token: ${{ secrets.CODECOV_TOKEN }}
51+
- name: Upload test results to Codecov
52+
if: ${{ !cancelled() }}
53+
uses: codecov/test-results-action@v1
54+
with:
55+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ dist/*
1111
venv
1212
.vscode
1313
tests/*.ipynb
14+
junit.xml

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
-r requirements.in
33
xmltodict>=0.12.0
44
pytest
5+
pytest-cov
56
coverage
67
py
78
flake8

0 commit comments

Comments
 (0)