diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5de8f610889ee6e176929124a41ba328b04cd1ac..577de61f9802633ab5fa30c4421f1c3fa57f910b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,7 +62,17 @@ lint: go-test: image: golang:$GO_VERSION-$ALPINE_VERSION stage: test - script: go test -v ./... + before_script: + - go get github.com/boumenot/gocover-cobertura + script: + - go test -v ./... -coverprofile=coverage.txt + - go run github.com/boumenot/gocover-cobertura < coverage.txt > coverage.xml + coverage: '/coverage: \d+.\d+% of statements/' + artifacts: + reports: + coverage_report: + coverage_format: cobertura + path: coverage.xml .docker-build: image: docker:24.0.5