-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
3 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 |
---|---|---|
|
@@ -92,15 +92,15 @@ jobs: | |
if: github.event_name == 'pull_request' || | ||
github.ref == 'refs/heads/dev' | ||
run: go test ./... | ||
-cover -args -test.gocoverdir="$PWD/gocoverage-unit/" | ||
-cover -covermode=count -args -test.gocoverdir="$PWD/gocoverage-unit/" | ||
- name: Run Go test -race (and collect code coverage) | ||
# note that -race can easily make the crypto stuff 10x slower | ||
# this is further limited to selected branches at the beginning of this file | ||
if: github.event_name == 'push' && | ||
github.ref != 'refs/heads/dev' | ||
run: go test ./... | ||
-race -timeout=15m -vet=off | ||
-cover -args -test.gocoverdir="$PWD/gocoverage-unit/" | ||
-cover -covermode=atomic -args -test.gocoverdir="$PWD/gocoverage-unit/" | ||
- name: Store code coverage artifact (unit) | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -161,8 +161,10 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: benjlevesque/[email protected] # sets env.SHA to the first 7 chars of github.sha | ||
- uses: actions/download-artifact@v3 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20' | ||
cache: false | ||
- name: Convert gocoverage format | ||
run: | | ||
go tool covdata textfmt -i=gocoverage-unit@${{ env.SHA }}/ \ | ||
|