forked from grafana/tempo
-
Notifications
You must be signed in to change notification settings - Fork 0
243 lines (194 loc) · 5.91 KB
/
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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
name: CI
on:
pull_request:
# Requiring certain checks for PRs to be merge-able in Github, forces for those checks to be *always* run.
# Even if the changes do not require them (i.e. the paths indicated below). That's why `paths-ignore` is commented out.
#
# paths-ignore:
# - 'docs/**'
# - 'example/**'
# - 'tools/**'
concurrency:
# Cancel any running workflow for the same branch when new commits are pushed.
# We group both by ref_name (available when CI is triggered by a push to a branch/tag)
# and head_ref (available when CI is triggered by a PR).
group: "${{ github.ref_name }}-${{ github.head_ref }}"
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Install jsonnetfmt and goimports
run: |
curl -fSL -o jsonnet.tar.gz https://github.com/google/jsonnet/releases/download/v0.17.0/jsonnet-bin-v0.17.0-linux.tar.gz
tar -xvf jsonnet.tar.gz -C /usr/local/bin/
chmod a+x /usr/local/bin/jsonnetfmt
go install golang.org/x/tools/cmd/goimports@v0.1.12
- name: Check out code
uses: actions/checkout@v3
- name: check-fmt
run: make check-fmt
- name: check-jsonnetfmt
run: make check-jsonnetfmt
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3
unit-tests-pkg:
name: Test packages - pkg
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Test
run: make test-with-cover-pkg
unit-tests-tempodb:
name: Test packages - tempodb
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Test
run: make test-with-cover-tempodb
unit-tests-tempodb-wal:
name: Test packages - tempodb/wal
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Test
run: make test-with-cover-tempodb-wal
unit-tests-others:
name: Test packages - others
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Test
run: make test-with-cover-others
integration-tests:
name: Test integration e2e suite
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Test
run: make test-e2e
- name: Poller
run: make test-integration-poller
integration-tests-serverless:
name: Test serverless integration e2e suite
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Test
run: make test-e2e-serverless
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Build Tempo
run: make tempo
- name: Build tempo-query
run: make tempo-query
- name: Build vulture
run: make tempo-vulture
- name: Build tempo-cli
run: make tempo-cli
benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Bench
run: make test-bench
vendor-check:
name: Vendor check
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.11.2'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check vendor
run: make vendor-check
tempo-jsonnet:
name: Check jsonnet & tempo-mixin
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Install jsonnet, jsonnet-bundler & tanka
run: |
curl -fSL -o jsonnet.tar.gz https://github.com/google/jsonnet/releases/download/v0.17.0/jsonnet-bin-v0.17.0-linux.tar.gz
tar -xvf jsonnet.tar.gz -C /usr/local/bin/
chmod a+x /usr/local/bin/jsonnet
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.4.0
curl -fSL -o /usr/local/bin/tk https://github.com/grafana/tanka/releases/download/v0.19.0/tk-linux-amd64
chmod a+x /usr/local/bin/tk
- name: Check out code
uses: actions/checkout@v3
- name: Check jsonnet
run: make jsonnet-check
- name: Check tempo-mixin
run: make tempo-mixin-check
- name: Test jsonnet
run: make jsonnet-test
build-technical-documentation:
name: Build technical documentation
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Build Website
run: docker run -v ${PWD}/docs/sources:/hugo/content/docs/tempo/latest --rm grafana/docs-base:latest make prod