Skip to content

Commit

Permalink
CI: codecov.yml, exclude mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
michurin committed Jul 6, 2024
1 parent 0e9d6b9 commit 4051b33
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ jobs:
with:
version: "v1.59"
- run: "go test -v -race -coverprofile=coverage.txt -covermode=atomic ./netpunchlib/..."
- run: "grep -v netpunchlib/internal/mock/connection.go coverage.txt >coverage-clean.txt"
- run: "rm coverage.txt" # otherwise it will be taken into account
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
files: ./coverage.txt
files: ./coverage-clean.txt
verbose: true
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# do not forget to validate it
# curl --data-binary @codecov.yml https://codecov.io/validate

comment: off
coverage:
precision: 2
range: [50, 75]
round: up

0 comments on commit 4051b33

Please sign in to comment.