blob: 03317fec188b8928b49ef1112c7fa3fa8ec8d130 (
plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
include:
- template: Security/License-Management.gitlab-ci.yml
- template: Security/SAST.gitlab-ci.yml
image: golang:1.11
stages:
- prepare
- test
.go-mod-cache:
variables:
GOPATH: $CI_PROJECT_DIR/.GOPATH
before_script:
- mkdir -p .GOPATH
cache:
paths:
- .GOPATH/pkg/mod/
.base-job:
only:
refs:
- merge_requests
- master
.tests:
extends:
- .base-job
- .go-mod-cache
stage: test
needs: ['download deps']
script:
- echo "Running all tests without daemonizing..."
- make test
- echo "Running just the acceptance tests daemonized (tmpdir)...."
- TEST_DAEMONIZE=tmpdir make acceptance
- echo "Running just the acceptance tests daemonized (inplace)...."
- TEST_DAEMONIZE=inplace make acceptance
artifacts:
paths:
- bin/gitlab-pages
license_management:
stage: prepare
variables:
LICENSE_MANAGEMENT_SETUP_CMD: go mod vendor
only:
refs:
- merge_requests
- master
changes:
- go.{mod,sum}
sast:
stage: prepare
only:
refs:
- merge_requests
- master
download deps:
extends:
- .base-job
- .go-mod-cache
stage: prepare
script:
- make deps-download
artifacts:
paths:
- go.mod
- go.sum
verify:
extends:
- .base-job
- .go-mod-cache
stage: test
needs: ['download deps']
script:
- make setup
- make generate-mocks
- make verify
- make cover
artifacts:
paths:
- coverage.html
test:1.11:
extends: .tests
image: golang:1.11
test:1.12:
extends: .tests
image: golang:1.12
test:1.13:
extends: .tests
image: golang:1.13
race:
extends: .go-mod-cache
stage: test
needs: ['download deps']
script:
- echo "Running race detector"
- make race
check deps:
extends:
- .base-job
- .go-mod-cache
stage: test
needs: ['download deps']
script:
- make deps-check
benchmark:
extends:
- .base-job
- .go-mod-cache
stage: test
needs: ['download deps']
script:
- make setup
- make benchstat
artifacts:
when: always
expire_in: 1 week
paths:
- bench.*.txt
|