Skip to content

Commit

Permalink
ci(build): Add upload of coverage reports to Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
gfieni committed May 5, 2023
1 parent 397f2c7 commit a85792a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
coverage:
precision: 2
round: down
range: "50...100"
status:
project:
default:
target: auto
threshold: 5%
patch:
default:
informational: true

comment:
layout: "reach, diff, files"
behavior: default
require_changes: true
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ jobs:
- name: Test with pytest
run: |
pytest --cov=smartwatts --cov-report=term --cov-report=xml tests/unit
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # v3.1.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml

0 comments on commit a85792a

Please sign in to comment.