-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
53 lines (44 loc) · 899 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
# GitLab CI Script
# Builds, Tests and Deploys the {{cookiecutter.name}}
#
#
# Services
#
#
# Constant Variables
#
variables:
DOCKER_IMAGE: {{cookiecutter.image}}
#
# Stages
#
stages:
- test
#
# Test Stages
#
# Runs tests in a go image
test:
stage: test
image: golang:{{cookiecutter.go}}-stretch # using debian to support go race detector
script:
- apk update && apk add make build-base git
- make test
# Runs code linting
lint:
stage: test
variables:
GOLANGCILINT_VERSION: {{cookiecutter.golangcilint_version}}
image: golangci/golangci-lint:${GOLANGCILINT_VERSION}-alpine
script:
- golangci-lint run -c ../.golangci.yml
# Runs dependency vetting
# https://github.com/sonatype-nexus-community/nancy
depcheck:
stage: test
image: sonatypecommunity/nancy:alpine
allow_failure: true
script:
- apk add go
- go list -json -m all | nancy sleuth