Skip to content

Commit

Permalink
chore(main): Ignore testdata from test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ekkinox committed Feb 20, 2024
1 parent 6b11fcc commit a98bfec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ jobs:
run: go mod download
- name: Run tests
working-directory: ${{ inputs.module }}
run: go test -v -race -failfast -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./...
run: go test -v -race -failfast -coverpkg=./... -covermode=atomic -coverprofile=coverage.tmp.out ./...
- name: Exclude testdata
working-directory: ${{ inputs.module }}
run: cat coverage.tmp.out | grep -v "testdata" > coverage.out
- name: Clean temp coverage
working-directory: ${{ inputs.module }}
run: rm coverage.tmp.out
- name: Codecov
uses: codecov/codecov-action@v3
with:
Expand Down

0 comments on commit a98bfec

Please sign in to comment.