Created
June 21, 2020 06:59
-
-
Save katoozi/b9483743f2b7e7d4f083c26f4f8b90bd to your computer and use it in GitHub Desktop.
gitlab ci for golang. "^coverage:\s(\d+(?:\.\d+)?%)" Test coverage parsing
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
image: golang:1.14 | |
stages: | |
- test | |
before_script: | |
- mkdir -p /go/src/gitlab.com | |
- ln -s /builds/user /go/src/gitlab.com/user | |
coverage: | |
stage: test | |
script: | |
- apk add --no-cache git build-base | |
- cd /go/src/gitlab.com/user/project | |
- go get ./... | |
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment