Skip to content

Commit

Permalink
Fix codecov (#283)
Browse files Browse the repository at this point in the history
## Describe your changes and provide context

## Testing performed to validate your change
  • Loading branch information
BrandonWeng authored Jun 12, 2023
1 parent 4dcff74 commit 3046382
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 62 deletions.
59 changes: 0 additions & 59 deletions .codecov.yml

This file was deleted.

12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,20 @@ jobs:
run: go get github.com/wadey/gocovmerge && go install github.com/wadey/gocovmerge

- name: Merge coverage reports
run: gocovmerge $(find . -name *profile.out) > coverage.txt
run: gocovmerge $(find . -type f -name '*profile.out') > coverage.txt

- name: Check coverage report lines
run: wc -l coverage.txt
continue-on-error: true

- name: Check coverage report files
run: ls **/*profile.out
continue-on-error: true

# Now we upload the merged report to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
22 changes: 20 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
coverage:
precision: 2
round: down
status:
# Learn more at https://docs.codecov.io/docs/commit-status
project:
default:
target: 80%
threshold: 1% # allow this much decrease on project
target: 70%

comment:
layout: "reach,diff,flags,tree,betaprofiling"
behavior: default # update if exists else create new
require_changes: true

ignore:
- "**/*pb*go" # Auto-generated files
- "docs"
- "*.md"
- "*.rst"
- "**/*pb*.go"
- "tests/*"
- "tests/**/*"
- "x/**/test_common.go"
- "scripts/"
- "contrib"

0 comments on commit 3046382

Please sign in to comment.