Skip to content
Snippets Groups Projects

chore(ci): add coverage reporting

Merged Leo requested to merge add-cov into master
+ 8
1
@@ -14,6 +14,13 @@ coverage:
stage: cover
image: alpinelinux/golang
script:
- go test $(go list ./... | grep -v /vendor/) -covermode=atomic -coverprofile .testCoverage.txt
- go get github.com/boumenot/gocover-cobertura
- go test -coverprofile=coverage.txt -covermode=count ./...
- gocover-cobertura < coverage.txt > coverage.xml
tags:
- docker-alpine
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
expire_in: 2 days
reports:
cobertura: coverage.xml
Loading