36
36
k8s : ${{ steps.filter.outputs.k8s }}
37
37
ci : ${{ steps.filter.outputs.ci }}
38
38
steps :
39
- - uses : actions/checkout@v3
39
+ - name : Checkout
40
+ uses : actions/checkout@v3
40
41
# For pull requests it's not necessary to checkout the code
41
- - uses : dorny/paths-filter@v2
42
+ - name : check changed files
43
+ uses : dorny/paths-filter@v2
42
44
id : filter
43
45
with :
44
46
filters : |
@@ -101,9 +103,11 @@ jobs:
101
103
- name : Checkout
102
104
uses : actions/checkout@v3
103
105
104
- - uses : ./.github/actions/setup-go
106
+ - name : Setup Node
107
+ uses : ./.github/actions/setup-node
105
108
106
- - uses : ./.github/actions/setup-node
109
+ - name : Setup Go
110
+ uses : ./.github/actions/setup-go
107
111
108
112
- name : Get golangci-lint cache dir
109
113
run : |
@@ -149,14 +153,19 @@ jobs:
149
153
needs : changes
150
154
if : needs.changes.outputs.docs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
151
155
steps :
152
- - uses : actions/checkout@v3
156
+ - name : Checkout
157
+ uses : actions/checkout@v3
153
158
154
- - uses : ./.github/actions/setup-node
155
- - uses : ./.github/actions/setup-go
159
+ - name : Setup Node
160
+ uses : ./.github/actions/setup-node
156
161
157
- - name : Install sqlc
158
- run : |
159
- curl -sSL https://github.com/kyleconroy/sqlc/releases/download/v1.18.0/sqlc_1.18.0_linux_amd64.tar.gz | sudo tar -C /usr/bin -xz sqlc
162
+ - name : Setup Go
163
+ uses : ./.github/actions/setup-go
164
+
165
+ - name : Setup sqlc
166
+ uses : sqlc-dev/setup-sqlc@v3
167
+ with :
168
+ sqlc-version : " 1.19.1"
160
169
161
170
- name : go install tools
162
171
run : |
@@ -192,9 +201,11 @@ jobs:
192
201
- name : Checkout
193
202
uses : actions/checkout@v3
194
203
195
- - uses : ./.github/actions/setup-node
204
+ - name : Setup Node
205
+ uses : ./.github/actions/setup-node
196
206
197
- - uses : buildjet/setup-go@v4
207
+ - name : Setup Go
208
+ uses : buildjet/setup-go@v4
198
209
with :
199
210
# This doesn't need caching. It's super fast anyways!
200
211
cache : false
@@ -235,10 +246,14 @@ jobs:
235
246
- macos-latest
236
247
- windows-2019
237
248
steps :
238
- - uses : actions/checkout@v3
249
+ - name : Checkout
250
+ uses : actions/checkout@v3
239
251
240
- - uses : ./.github/actions/setup-go
241
- - uses : ./.github/actions/setup-tf
252
+ - name : Setup Go
253
+ uses : ./.github/actions/setup-go
254
+
255
+ - name : Setup Terraform
256
+ uses : ./.github/actions/setup-tf
242
257
243
258
- name : Test with Mock Database
244
259
id : test
@@ -269,12 +284,14 @@ jobs:
269
284
# so we need to print the test stats to the log.
270
285
go run ./scripts/ci-report/main.go gotests.json | tee gotests_stats.json
271
286
272
- - uses : ./.github/actions/upload-datadog
287
+ - name : Upload test stats to Datadog
288
+ uses : ./.github/actions/upload-datadog
273
289
if : success() || failure()
274
290
with :
275
291
api-key : ${{ secrets.DATADOG_API_KEY }}
276
292
277
- - uses : codecov/codecov-action@v3
293
+ - name : Check code coverage
294
+ uses : codecov/codecov-action@v3
278
295
# This action has a tendency to error out unexpectedly, it has
279
296
# the `fail_ci_if_error` option that defaults to `false`, but
280
297
# that is no guarantee, see:
@@ -296,10 +313,14 @@ jobs:
296
313
# even if some of the preceding steps are slow.
297
314
timeout-minutes : 25
298
315
steps :
299
- - uses : actions/checkout@v3
316
+ - name : Checkout
317
+ uses : actions/checkout@v3
318
+
319
+ - name : Setup Go
320
+ uses : ./.github/actions/setup-go
300
321
301
- - uses : ./.github/actions/setup-go
302
- - uses : ./.github/actions/setup-tf
322
+ - name : Setup Terraform
323
+ uses : ./.github/actions/setup-tf
303
324
304
325
- name : Test with PostgreSQL Database
305
326
run : |
@@ -313,12 +334,14 @@ jobs:
313
334
# so we need to print the test stats to the log.
314
335
go run ./scripts/ci-report/main.go gotests.json | tee gotests_stats.json
315
336
316
- - uses : ./.github/actions/upload-datadog
337
+ - name : Upload test stats to Datadog
338
+ uses : ./.github/actions/upload-datadog
317
339
if : success() || failure()
318
340
with :
319
341
api-key : ${{ secrets.DATADOG_API_KEY }}
320
342
321
- - uses : codecov/codecov-action@v3
343
+ - name : Check code coverage
344
+ uses : codecov/codecov-action@v3
322
345
# This action has a tendency to error out unexpectedly, it has
323
346
# the `fail_ci_if_error` option that defaults to `false`, but
324
347
# that is no guarantee, see:
@@ -336,16 +359,21 @@ jobs:
336
359
if : needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
337
360
timeout-minutes : 25
338
361
steps :
339
- - uses : actions/checkout@v3
362
+ - name : Checkout
363
+ uses : actions/checkout@v3
364
+
365
+ - name : Setup Go
366
+ uses : ./.github/actions/setup-go
340
367
341
- - uses : ./.github/actions/setup-go
342
- - uses : ./.github/actions/setup-tf
368
+ - name : Setup Terraform
369
+ uses : ./.github/actions/setup-tf
343
370
344
371
- name : Run Tests
345
372
run : |
346
373
gotestsum --junitfile="gotests.xml" -- -race ./...
347
374
348
- - uses : ./.github/actions/upload-datadog
375
+ - name : Upload test stats to Datadog
376
+ uses : ./.github/actions/upload-datadog
349
377
if : always()
350
378
with :
351
379
api-key : ${{ secrets.DATADOG_API_KEY }}
@@ -362,7 +390,8 @@ jobs:
362
390
contents : read
363
391
id-token : write
364
392
steps :
365
- - uses : actions/checkout@v3
393
+ - name : Checkout
394
+ uses : actions/checkout@v3
366
395
with :
367
396
fetch-depth : 0
368
397
@@ -375,8 +404,11 @@ jobs:
375
404
- name : Set up Google Cloud SDK
376
405
uses : google-github-actions/setup-gcloud@v1
377
406
378
- - uses : ./.github/actions/setup-go
379
- - uses : ./.github/actions/setup-node
407
+ - name : Setup Node
408
+ uses : ./.github/actions/setup-node
409
+
410
+ - name : Setup Go
411
+ uses : ./.github/actions/setup-go
380
412
381
413
- name : Install goimports
382
414
run : go install golang.org/x/tools/cmd/goimports@latest
@@ -430,7 +462,8 @@ jobs:
430
462
echo "::endgroup::"
431
463
done
432
464
433
- - uses : actions/upload-artifact@v3
465
+ - name : Upload build artifacts
466
+ uses : actions/upload-artifact@v3
434
467
with :
435
468
name : coder
436
469
path : |
@@ -445,14 +478,17 @@ jobs:
445
478
if : needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
446
479
timeout-minutes : 20
447
480
steps :
448
- - uses : actions/checkout@v3
481
+ - name : Checkout
482
+ uses : actions/checkout@v3
449
483
450
- - uses : ./.github/actions/setup-node
484
+ - name : Setup Node
485
+ uses : ./.github/actions/setup-node
451
486
452
487
- run : yarn test:ci --max-workers $(nproc)
453
488
working-directory : site
454
489
455
- - uses : codecov/codecov-action@v3
490
+ - name : Check code coverage
491
+ uses : codecov/codecov-action@v3
456
492
# This action has a tendency to error out unexpectedly, it has
457
493
# the `fail_ci_if_error` option that defaults to `false`, but
458
494
# that is no guarantee, see:
@@ -470,11 +506,17 @@ jobs:
470
506
if : needs.changes.outputs.go == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
471
507
timeout-minutes : 20
472
508
steps :
473
- - uses : actions/checkout@v3
509
+ - name : Checkout
510
+ uses : actions/checkout@v3
511
+
512
+ - name : Setup Node
513
+ uses : ./.github/actions/setup-node
474
514
475
- - uses : ./.github/actions/setup-node
476
- - uses : ./.github/actions/setup-go
477
- - uses : ./.github/actions/setup-tf
515
+ - name : Setup Go
516
+ uses : ./.github/actions/setup-go
517
+
518
+ - name : Setup Terraform
519
+ uses : ./.github/actions/setup-tf
478
520
479
521
- name : Build
480
522
run : |
@@ -503,13 +545,15 @@ jobs:
503
545
needs : changes
504
546
if : needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
505
547
steps :
506
- - uses : actions/checkout@v3
548
+ - name : Checkout
549
+ uses : actions/checkout@v3
507
550
with :
508
551
# Required by Chromatic for build-over-build history, otherwise we
509
552
# only get 1 commit on shallow checkout.
510
553
fetch-depth : 0
511
554
512
- - uses : ./.github/actions/setup-node
555
+ - name : Setup Node
556
+ uses : ./.github/actions/setup-node
513
557
514
558
# This step is not meant for mainline because any detected changes to
515
559
# storybook snapshots will require manual approval/review in order for
0 commit comments