Skip to content

Commit

Permalink
use gotestsum (#4)
Browse files Browse the repository at this point in the history
* Add test results with gotestsum

* fix path

* Fix 'unknown'

* Write files to /tmp by default

* change to gotest
  • Loading branch information
tlkamp authored Dec 8, 2019
1 parent 9d663d2 commit 4873a44
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ jobs:
- run:
name: Code Coverage
command: |
mkdir -p /tmp/artifacts
go test -covermode=count -coverprofile=count.out ./...
go get gotest.tools/gotestsum
mkdir -p /tmp/artifacts/gotest
gotestsum --junitfile /tmp/artifacts/gotest/test-results.xml -- -covermode=count -coverprofile=count.out ./...
go tool cover -func=count.out
go tool cover -html=count.out -o coverage.html
mv coverage.html /tmp/artifacts
go tool cover -html=count.out -o /tmp/artifacts/coverage.html
- store_artifacts:
path: /tmp/artifacts
- store_test_results:
path: /tmp/artifacts/gotest
- run:
name: Build
command: go build

0 comments on commit 4873a44

Please sign in to comment.