diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 631e6a5..d145bd6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,11 +8,18 @@ stages: test: stage: test image: golang:alpine + variables: + GOPATH: $CI_PROJECT_DIR/.go + before_script: + - mkdir -p .go script: - go mod download - go test ./... -v -coverprofile=coverage.txt -covermode count - go get github.com/boumenot/gocover-cobertura - go run github.com/boumenot/gocover-cobertura < coverage.txt > coverage.xml + cache: + paths: + - .go/pkg/mod/ artifacts: reports: coverage_report: