-
Notifications
You must be signed in to change notification settings - Fork 0
361 lines (291 loc) · 9.47 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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
---
jobs:
Benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Setup Elixir
uses: ./.github/actions/setup-elixir
- name: Cache Results
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4
with:
key: benchmarks
path: benchmark_results
- name: Start Docker Compose
uses: ./.github/actions/start-docker-compose
- name: Benchmark
run: mix benchmark
Docs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Setup Elixir
uses: ./.github/actions/setup-elixir
- name: Build Docs
run: mix docs
Format_Elixir:
name: Format (Elixir)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Setup Elixir
uses: ./.github/actions/setup-elixir
- name: Format
run: mix format ${{ github.event_name == 'pull_request' && '' || '--check-formatted' }}
- if: ${{ github.event_name == 'pull_request' }}
name: Suggest
uses: reviewdog/action-suggester@db4abb16fbaabe386831e5addb7be1485d0d63d3 # v1
with:
fail_on_error: true
filter_mode: nofilter
tool_name: mix
Lint_Actions:
name: Lint (Actions)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Lint
uses: reviewdog/action-actionlint@7eeec1dd160c2301eb28e1568721837d084558ad # v1
with:
fail_on_error: true
filter_mode: nofilter
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
Lint_Alex:
name: Lint (Alex)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Lint
uses: reviewdog/action-alex@73756e09c07d6025e86f0ac5605b65f2d4b4b78b # v1
with:
filter_mode: ${{ github.event_name == 'pull_request' && 'added' || 'nofilter' }}
level: info
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
Lint_CSS:
name: Lint (CSS)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Install Stylelint
run: npm install stylelint stylelint-config-standard
- name: Lint
uses: reviewdog/action-stylelint@c1da6e75d890eba79f82a4294e867cbd720b52d9 # v1
with:
fail_on_error: true
filter_mode: nofilter
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
stylelint_config: .github/linters/.stylelintrc.json
Lint_Credo:
name: Lint (Credo)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Setup Elixir
uses: ./.github/actions/setup-elixir
- name: Credo
run: mix credo
Lint_Docker:
name: Lint (Docker)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Lint
uses: reviewdog/action-hadolint@73fec8b28091e5082c19df69815dd749d97b882a # v1
with:
fail_on_error: true
filter_mode: nofilter
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
Lint_Doctor:
name: Lint (Doctor)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Setup Elixir
uses: ./.github/actions/setup-elixir
- name: Doctor
run: mix doctor
Lint_Javascript:
name: Lint (Javascript)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Install Standard
run: npm install eslint-config-standard eslint-plugin-promise eslint-plugin-import eslint-plugin-n
- name: Lint
uses: reviewdog/action-eslint@9a6606695f1ef9709cce821919ca3b2a6d5e6bb5 # v1
with:
eslint_flags: --config .github/linters/.eslintrc.json .
fail_on_error: true
filter_mode: nofilter
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
Lint_Markdown:
name: Lint (Markdown)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Lint
uses: reviewdog/action-markdownlint@28fb4224271253fedd5079b61de820d6228041fd # v0
with:
fail_on_error: true
filter_mode: nofilter
markdownlint_flags: -c .github/linters/.markdown-lint.yml .
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
Lint_Misspell:
name: Lint (Misspell)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Lint
uses: reviewdog/action-misspell@ef8b22c1cca06c8d306fc6be302c3dab0f6ca12f # v1
with:
fail_on_error: true
filter_mode: nofilter
ignore: behaviour
locale: US
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
Lint_Shellcheck:
name: Lint (Shellcheck)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Lint
uses: reviewdog/action-shellcheck@ccaafec556ffa154f112bfcb7b9c9574190b7091 # v1
with:
fail_on_error: true
filter_mode: nofilter
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
Lint_Shfmt:
name: Lint (shfmt)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Lint
uses: reviewdog/action-shfmt@f59386f08bd9a24ac1a746e69f026ddc2ed06710 # v1
with:
fail_on_error: true
filter_mode: nofilter
Lint_Yaml:
name: Lint (Yaml)
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Lint
uses: reviewdog/action-yamllint@e09f07780388032a624e9eb44a23fd1bbb4052cc # v1
with:
fail_on_error: true
filter_mode: nofilter
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
yamllint_flags: -c .github/linters/.yaml-lint.yml .
Sobelow:
permissions:
contents: read
security-events: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Setup Elixir
uses: ./.github/actions/setup-elixir
- name: Compile
run: mix compile
- name: Sobelow
run: mix sobelow
# We run once to allow any compile warnings or things that
# would interfere with the JSON output
- name: Sobelow Sarif
run: mix sobelow --skip --format sarif > results.sarif
- name: Upload Report
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3
with:
sarif_file: results.sarif
Test:
env:
MIX_ENV: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Setup Elixir
uses: ./.github/actions/setup-elixir
- name: Compile
run: mix compile --all-warnings --warnings-as-errors
- name: Start Docker Compose
uses: ./.github/actions/start-docker-compose
- name: Test
run: mix test --all-warnings --cover --warnings-as-errors
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch: