forked from interuss/dss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
45 lines (45 loc) · 1.54 KB
/
cloudbuild.yaml
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
steps:
- id: 'Setup: Pull Dependencies'
name: golang
env: ['GO111MODULE=on', 'CGO_ENABLED=0']
args: ['go', 'mod', 'tidy']
volumes:
- name: 'go-vol'
path: '/go'
- id: 'Lint: Formatting'
name: golangci/golangci-lint:v1.23.8
# Disable staticcheck since grpc-gateway doesn't use DialContext
args: ['golangci-lint', 'run', '--timeout', '5m', '-v', '-E', 'gofmt,bodyclose,rowserrcheck,misspell,golint', '-D', 'staticcheck,vet']
volumes:
- name: 'go-vol'
path: '/go'
- id: 'Lint: Formatting: vet'
name: golangci/golangci-lint:v1.23.8
# Run vet separately to try and fix https://github.com/golangci/golangci-lint/issues/896
args: ['golangci-lint', 'run', '-v', '--disable-all', '-E', 'vet', '--timeout', '5m']
volumes:
- name: 'go-vol'
path: '/go'
- id: 'Lint: Formatting staticcheck'
name: golangci/golangci-lint:v1.24.0
# Run staticcheck everywhere but the http-gateway
args: ['golangci-lint', 'run', '-v', '--disable-all', '-E', 'staticcheck', '--skip-dirs', '^cmds/http-gateway,^pkg/logging', '--timeout', '5m']
volumes:
- name: 'go-vol'
path: '/go'
- id: 'Test: 10x with Race Detection and Coverage'
name: golang
env: ['GO111MODULE=on']
args: ['go', 'test', './...', '-race', '-test.count', '10', '-cover']
- id: 'Evaluate examples/minimum'
name: 'grafana/tanka'
args:
- 'show'
- '--dangerous-allow-redirect'
- 'build/deploy/examples/minimum'
- id: 'Evaluate examples/schema_manager'
name: 'grafana/tanka'
args:
- 'show'
- '--dangerous-allow-redirect'
- 'build/deploy/examples/schema_manager'