34
34
tailnet-integration : ${{ steps.filter.outputs.tailnet-integration }}
35
35
steps :
36
36
- name : Harden Runner
37
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
37
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
38
38
with :
39
39
egress-policy : audit
40
40
@@ -155,7 +155,7 @@ jobs:
155
155
runs-on : ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
156
156
steps :
157
157
- name : Harden Runner
158
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
158
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
159
159
with :
160
160
egress-policy : audit
161
161
@@ -188,7 +188,7 @@ jobs:
188
188
189
189
# Check for any typos
190
190
- name : Check for typos
191
- uses : crate-ci/typos@d1c850b2b5d502763520c25fb4a6a1128ad99bd9 # v1.28.3
191
+ uses : crate-ci/typos@685eb3d55be2f85191e8c84acb9f44d7756f84ab # v1.29.4
192
192
with :
193
193
config : .github/workflows/typos.toml
194
194
@@ -227,7 +227,7 @@ jobs:
227
227
if : always()
228
228
steps :
229
229
- name : Harden Runner
230
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
230
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
231
231
with :
232
232
egress-policy : audit
233
233
@@ -290,7 +290,7 @@ jobs:
290
290
timeout-minutes : 7
291
291
steps :
292
292
- name : Harden Runner
293
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
293
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
294
294
with :
295
295
egress-policy : audit
296
296
@@ -331,7 +331,7 @@ jobs:
331
331
- windows-2022
332
332
steps :
333
333
- name : Harden Runner
334
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
334
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
335
335
with :
336
336
egress-policy : audit
337
337
@@ -378,8 +378,62 @@ jobs:
378
378
with :
379
379
api-key : ${{ secrets.DATADOG_API_KEY }}
380
380
381
+ # We don't run the full test-suite for Windows & MacOS, so we just run the CLI tests on every PR.
382
+ # We run the test suite in test-go-pg, including CLI.
383
+ test-cli :
384
+ runs-on : ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
385
+ needs : changes
386
+ if : needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
387
+ strategy :
388
+ matrix :
389
+ os :
390
+ - macos-latest
391
+ - windows-2022
392
+ steps :
393
+ - name : Harden Runner
394
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
395
+ with :
396
+ egress-policy : audit
397
+
398
+ - name : Checkout
399
+ uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
400
+ with :
401
+ fetch-depth : 1
402
+
403
+ - name : Setup Go
404
+ uses : ./.github/actions/setup-go
405
+
406
+ - name : Setup Terraform
407
+ uses : ./.github/actions/setup-tf
408
+
409
+ # Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
410
+ - name : Setup ImDisk
411
+ if : runner.os == 'Windows'
412
+ uses : ./.github/actions/setup-imdisk
413
+
414
+ - name : Test CLI
415
+ env :
416
+ TS_DEBUG_DISCO : " true"
417
+ LC_CTYPE : " en_US.UTF-8"
418
+ LC_ALL : " en_US.UTF-8"
419
+ shell : bash
420
+ run : |
421
+ # By default Go will use the number of logical CPUs, which
422
+ # is a fine default.
423
+ PARALLEL_FLAG=""
424
+
425
+ make test-cli
426
+
427
+ - name : Upload test stats to Datadog
428
+ timeout-minutes : 1
429
+ continue-on-error : true
430
+ uses : ./.github/actions/upload-datadog
431
+ if : success() || failure()
432
+ with :
433
+ api-key : ${{ secrets.DATADOG_API_KEY }}
434
+
381
435
test-go-pg :
382
- runs-on : ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
436
+ runs-on : ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os }}
383
437
needs : changes
384
438
if : needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
385
439
# This timeout must be greater than the timeout set by `go test` in
@@ -391,11 +445,9 @@ jobs:
391
445
matrix :
392
446
os :
393
447
- ubuntu-latest
394
- - macos-latest
395
- - windows-2022
396
448
steps :
397
449
- name : Harden Runner
398
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
450
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
399
451
with :
400
452
egress-policy : audit
401
453
@@ -423,39 +475,11 @@ jobs:
423
475
LC_ALL : " en_US.UTF-8"
424
476
shell : bash
425
477
run : |
426
- # if macOS, install google-chrome for scaletests
427
- # As another concern, should we really have this kind of external dependency
428
- # requirement on standard CI?
429
- if [ "${{ matrix.os }}" == "macos-latest" ]; then
430
- brew install google-chrome
431
- fi
432
-
433
478
# By default Go will use the number of logical CPUs, which
434
479
# is a fine default.
435
480
PARALLEL_FLAG=""
436
481
437
- # macOS will output "The default interactive shell is now zsh"
438
- # intermittently in CI...
439
- if [ "${{ matrix.os }}" == "macos-latest" ]; then
440
- touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile
441
- fi
442
-
443
- if [ "${{ runner.os }}" == "Linux" ]; then
444
- make test-postgres
445
- elif [ "${{ runner.os }}" == "Windows" ]; then
446
- # Create a temp dir on the R: ramdisk drive for Windows. The default
447
- # C: drive is extremely slow: https://github.com/actions/runner-images/issues/8755
448
- mkdir -p "R:/temp/embedded-pg"
449
- go run scripts/embedded-pg/main.go -path "R:/temp/embedded-pg"
450
- # Reduce test parallelism, mirroring what we do for race tests.
451
- # We'd been encountering issues with timing related flakes, and
452
- # this seems to help.
453
- DB=ci gotestsum --format standard-quiet -- -v -short -count=1 -parallel 4 -p 4 ./...
454
- else
455
- go run scripts/embedded-pg/main.go
456
- # Reduce test parallelism, like for Windows above.
457
- DB=ci gotestsum --format standard-quiet -- -v -short -count=1 -parallel 4 -p 4 ./...
458
- fi
482
+ make test-postgres
459
483
460
484
- name : Upload test stats to Datadog
461
485
timeout-minutes : 1
@@ -480,7 +504,7 @@ jobs:
480
504
timeout-minutes : 25
481
505
steps :
482
506
- name : Harden Runner
483
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
507
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
484
508
with :
485
509
egress-policy : audit
486
510
@@ -517,7 +541,7 @@ jobs:
517
541
timeout-minutes : 25
518
542
steps :
519
543
- name : Harden Runner
520
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
544
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
521
545
with :
522
546
egress-policy : audit
523
547
@@ -555,7 +579,7 @@ jobs:
555
579
timeout-minutes : 25
556
580
steps :
557
581
- name : Harden Runner
558
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
582
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
559
583
with :
560
584
egress-policy : audit
561
585
@@ -603,7 +627,7 @@ jobs:
603
627
timeout-minutes : 20
604
628
steps :
605
629
- name : Harden Runner
606
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
630
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
607
631
with :
608
632
egress-policy : audit
609
633
@@ -629,7 +653,7 @@ jobs:
629
653
timeout-minutes : 20
630
654
steps :
631
655
- name : Harden Runner
632
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
656
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
633
657
with :
634
658
egress-policy : audit
635
659
@@ -661,7 +685,7 @@ jobs:
661
685
name : ${{ matrix.variant.name }}
662
686
steps :
663
687
- name : Harden Runner
664
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
688
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
665
689
with :
666
690
egress-policy : audit
667
691
@@ -727,7 +751,7 @@ jobs:
727
751
if : needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true'
728
752
steps :
729
753
- name : Harden Runner
730
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
754
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
731
755
with :
732
756
egress-policy : audit
733
757
@@ -804,7 +828,7 @@ jobs:
804
828
805
829
steps :
806
830
- name : Harden Runner
807
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
831
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
808
832
with :
809
833
egress-policy : audit
810
834
@@ -878,7 +902,7 @@ jobs:
878
902
if : always()
879
903
steps :
880
904
- name : Harden Runner
881
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
905
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
882
906
with :
883
907
egress-policy : audit
884
908
@@ -914,7 +938,7 @@ jobs:
914
938
runs-on : ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }}
915
939
steps :
916
940
- name : Harden Runner
917
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
941
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
918
942
with :
919
943
egress-policy : audit
920
944
@@ -1000,7 +1024,7 @@ jobs:
1000
1024
IMAGE : ghcr.io/coder/coder-preview:${{ steps.build-docker.outputs.tag }}
1001
1025
steps :
1002
1026
- name : Harden Runner
1003
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
1027
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
1004
1028
with :
1005
1029
egress-policy : audit
1006
1030
@@ -1136,7 +1160,7 @@ jobs:
1136
1160
id-token : write
1137
1161
steps :
1138
1162
- name : Harden Runner
1139
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
1163
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
1140
1164
with :
1141
1165
egress-policy : audit
1142
1166
@@ -1198,7 +1222,7 @@ jobs:
1198
1222
if : github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
1199
1223
steps :
1200
1224
- name : Harden Runner
1201
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
1225
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
1202
1226
with :
1203
1227
egress-policy : audit
1204
1228
@@ -1233,7 +1257,7 @@ jobs:
1233
1257
if : needs.changes.outputs.db == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
1234
1258
steps :
1235
1259
- name : Harden Runner
1236
- uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
1260
+ uses : step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
1237
1261
with :
1238
1262
egress-policy : audit
1239
1263
0 commit comments