-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
61 lines (51 loc) · 875 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
54
55
56
57
58
59
60
61
---
include:
- template: Security/Secret-Detection.gitlab-ci.yml
- template: Security/SAST.gitlab-ci.yml
image: golang:1.15
cache:
paths:
- /apt-cache
- /go/src/github.com
- /go/src/golang.org
- /go/src/google.golang.org
stages:
- check
- dep
- vet
- staticcheck
- build
- test
sast:
stage: check
secret_detection:
stage: check
OSV scanner:
image:
name: golang:latest
stage: check
before_script:
- "go install github.com/google/osv-scanner/cmd/osv-scanner@v1"
script:
- 'PATH="${PATH}:$(go env GOPATH)/bin" osv-scanner -r .'
timeout: 10 minutes
dep:
stage: dep
script:
- "make dep"
vet:
stage: vet
script:
- "make vet"
staticcheck:
stage: staticcheck
script:
- "make staticcheck"
build:
stage: build
script:
- "make compile"
test:
stage: test
script:
- "make test"