Skip to content

Commit

Permalink
chore: fix coverage uploads to Codecov (#306)
Browse files Browse the repository at this point in the history
chore: write test cov results to separate files

Write test reports to separate files and upload them separately

Signed-off-by: Bernd Warmuth <[email protected]>
  • Loading branch information
warber authored Nov 26, 2024
1 parent 510b2a6 commit 96d86ba
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,24 @@ jobs:
path: ~/go/pkg/mod
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
- name: Run unit tests
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
run: go test -race -short -coverpkg=./... -coverprofile=coverage-unit.out -covermode=atomic ./...
- name: Run e2e tests
run: go test -race --coverprofile=coverage.out -covermode=atomic ./e2e/...
- name: Upload coverage to Codecov
run: go test -race -coverpkg=./... -coverprofile=coverage-e2e.out -covermode=atomic ./e2e/...
- name: Upload coverage to Codecov (unit)
uses: codecov/[email protected]
with:
name: Code Coverage for GO SDK
name: Code Coverage for GO SDK (unit)
files: ./coverage-unit.out
flags: unit
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
- name: Upload coverage to Codecov (e2e)
uses: codecov/[email protected]
with:
name: Code Coverage for GO SDK (e2e)
files: ./coverage-e2e.out
flags: e2e
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }}

0 comments on commit 96d86ba

Please sign in to comment.