Skip to content

Commit

Permalink
feat: add ability for codecov to get test healthiness (#218)
Browse files Browse the repository at this point in the history
* feat: add ability for codecov to get test healthiness

* fix: invalid yaml
  • Loading branch information
vinitkumar authored Sep 21, 2024
1 parent 56613b8 commit 1c87cb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ jobs:
python -m pip install --upgrade pip
pip install --upgrade -r requirements-dev.txt
pip install .
- name: Unit tests
- name: Test with pytest
run: |
coverage run -m pytest
coverage xml
pytest --cov --junitxml=junit.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dist/*
venv
.vscode
tests/*.ipynb
junit.xml
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-r requirements.in
xmltodict>=0.12.0
pytest
pytest-cov
coverage
py
flake8
Expand Down

0 comments on commit 1c87cb8

Please sign in to comment.