Files
authz_client/.gitlab-ci.yml
T
2022-02-20 00:56:58 +01:00

31 lines
729 B
YAML

include:
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
image: golang:1.15
variables:
GOFLAGS: -mod=readonly
stages:
- deps
- test
deps:
stage: deps
script:
- go mod download
test:
stage: test
dependencies:
- deps
script:
- go fmt $(go list ./...)
- go vet $(go list ./...)
- CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
- go tool cover -html=coverage.txt -o coverage.html
- go tool cover -func=coverage.txt
- curl -Os https://uploader.codecov.io/latest/linux/codecov
- chmod +x codecov
- ./codecov -t ${CODECOV_TOKEN} -R $CI_PROJECT_DIR -C $CI_COMMIT_SHA -r $CI_PROJECT_PATH