github.com/LINBIT/golinstor@v0.52.0/.gitlab-ci.yml (about) 1 # Use the same image version as the minimum version on go.mod 2 image: golang:1.18 3 4 test: 5 stage: test 6 cache: 7 paths: 8 - .mygo/pkg/mod 9 variables: 10 GOPATH: $CI_PROJECT_DIR/.mygo 11 script: 12 - go mod tidy 13 - git diff --exit-code go.mod go.sum || (echo "Run go mod tidy!" >&2 ; exit 1) 14 - go test -v -coverprofile .testCoverage.txt -covermode count ./client 2>&1 | go run github.com/jstemmer/go-junit-report@latest -set-exit-code > test.xml 15 - go run github.com/boumenot/gocover-cobertura@latest < .testCoverage.txt > coverage.xml 16 artifacts: 17 reports: 18 coverage_report: 19 coverage_format: cobertura 20 path: coverage.xml 21 junit: test.xml