Skip to content

Commit

Permalink
feat: add ability for codecov to get test healthiness
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinit Kumar committed Sep 21, 2024
1 parent 56613b8 commit 0d14d03
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ jobs:
pip install --upgrade -r requirements-dev.txt
pip install .
- name: Unit tests
run: |
coverage run -m pytest
coverage 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)
run: |
pytest --cov --junitxml=junit.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
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 0d14d03

Please sign in to comment.