Repository navigation
Expand file tree
/
Copy pathconfig.yml
More file actions
138 lines (128 loc) · 2.7 KB
/
Copy pathconfig.yml
File metadata and controls
138 lines (128 loc) · 2.7 KB
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
131
132
133
134
135
136
137
138
version: 2.1
download: &download
steps:
- checkout
- run:
name: "Download dependencies"
command: "go get -d -t ./..."
- run:
name: "Download staticcheck"
command: "go get honnef.co/go/tools/cmd/staticcheck"
- run:
name: "Download go-junit-report"
command: "go get github.com/jstemmer/go-junit-report"
- persist_to_workspace:
root: "/go/"
paths:
- "src/*"
- "bin/staticcheck"
- "bin/go-junit-report"
gofmt: &gofmt
steps:
- attach_workspace:
at: "/go/"
- run:
name: "gofmt"
command: "[ -z \"$(gofmt -l .)\" ] || exit $?"
test: &test
steps:
- attach_workspace:
at: "/go/"
- run:
name: "Run tests"
command: "go test -parallel=2 -v ./... >/tmp/test.out"
- run:
name: "Process test results"
when: always
command: |
mkdir -p /tmp/test-results/go-test
go-junit-report < /tmp/test.out > /tmp/test-results/go-test/results.xml
cat /tmp/test.out
- store_test_results:
path: "/tmp/test-results"
vet: &vet
steps:
- attach_workspace:
at: "/go/"
- run:
name: "Run go vet"
command: "go vet ./..."
staticcheck: &staticcheck
steps:
- attach_workspace:
at: "/go/"
- run:
Name: "Run staticcheck"
command: "staticcheck -go 1.11 ./..."
executors:
go11:
docker:
- image: "circleci/golang:1.11.9"
working_directory: "/go/src/honnef.co/go/tools"
go12:
docker:
- image: "circleci/golang:1.12.5"
working_directory: "/go/src/honnef.co/go/tools"
jobs:
download12:
executor: go12
<<: *download
gofmt12:
executor: go12
<<: *gofmt
test12:
executor: go12
<<: *test
vet12:
executor: go12
<<: *vet
staticcheck12:
executor: go12
<<: *staticcheck
download11:
executor: go11
<<: *download
gofmt11:
executor: go11
<<: *gofmt
test11:
executor: go11
<<: *test
vet11:
executor: go11
<<: *vet
staticcheck11:
executor: go11
<<: *staticcheck
workflows:
version: 2
ci12:
jobs:
- download12
- gofmt12:
requires:
- download12
- test12:
requires:
- download12
- vet12:
requires:
- download12
- staticcheck12:
requires:
- download12
ci11:
jobs:
- download11
- gofmt11:
requires:
- download11
- test11:
requires:
- download11
- vet11:
requires:
- download11
- staticcheck11:
requires:
- download11