44 lines
924 B
YAML
44 lines
924 B
YAML
include:
|
|
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
|
|
- project: 'unboundsoftware/dependabot-staged-flow'
|
|
file: '.gitlab-ci.yml'
|
|
|
|
image: golang:1.15
|
|
|
|
variables:
|
|
GOFLAGS: -mod=readonly
|
|
|
|
stages:
|
|
- deps
|
|
- test
|
|
- dependabot
|
|
|
|
.exclude_from_schedule: ¬_on_schedule
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
when: never
|
|
- when: always
|
|
|
|
deps:
|
|
<<: *not_on_schedule
|
|
stage: deps
|
|
script:
|
|
- go mod download
|
|
|
|
test:
|
|
<<: *not_on_schedule
|
|
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
|
|
- bash <(curl -s https://codecov.io/bash)
|
|
artifacts:
|
|
paths:
|
|
- coverage.html
|
|
- coverage.txt
|