Skip to content

Commit

Permalink
add codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
ejm714 committed Oct 10, 2023
1 parent 7488130 commit cccbe57
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 1
round: down
range: "70...100"
status:
project: # Coverage of whole project
default:
target: auto # Coverage target to pass; auto is base commit
threshold: 5% # Allow coverage to drop by this much vs. base and still pass
patch: # Coverage of lines in this change
default:
target: 80% # Coverage target to pass
threshold: 20% # Allow coverage to drop by this much vs. base and still pass

comment:
layout: "diff,flags,tree"
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,11 @@ jobs:
cyfi --version
python -m pip install dist/cyfi-*.tar.gz --no-deps --force-reinstall
cyfi --version
- name: Upload coverage to codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: true

0 comments on commit cccbe57

Please sign in to comment.