telegraph/.gitlab-ci.yml

39 lines
623 B
YAML
Raw Normal View History

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