image: golang:alpine variables: GO111MODULE: "on" CGO_ENABLED: "0" GOOS: "linux" cache: key: ${CI_COMMIT_REF_SLUG} paths: - /var/cache/apk - /go/pkg/mod stages: - test - review before_script: - apk add --no-cache git make - go get github.com/golangci/golangci-lint/cmd/golangci-lint - go install github.com/golangci/golangci-lint/cmd/golangci-lint - make tidy unit_tests: stage: test script: - make test code_coverage: stage: test script: - make coverage coverage: '/^coverage:\s(\d+(?:\.\d+)?%)/' lint_code: stage: review script: - make lint allow_failure: true