Skip to content

Commit

Permalink
job_go_test: covermode=count
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui committed Sep 20, 2023
1 parent 24fd7ef commit bf4c662
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}/ \
Expand Down

0 comments on commit bf4c662

Please sign in to comment.