-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Bernd Warmuth
committed
Nov 25, 2024
1 parent
510b2a6
commit bdea86c
Showing
1 changed file
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 -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 }} |