34
34
tailnet-integration : ${{ steps.filter.outputs.tailnet-integration }}
35
35
steps :
36
36
- name : Harden Runner
37
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
37
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
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@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
158
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
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@b74202f74b4346efdbce7801d187ec57b266bac8 # v1.27.3
191
+ uses : crate-ci/typos@2872c382bb9668d4baa5eade234dcbc0048ca2cf # v1.28.2
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@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
230
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
231
231
with :
232
232
egress-policy : audit
233
233
@@ -281,7 +281,7 @@ jobs:
281
281
timeout-minutes : 7
282
282
steps :
283
283
- name : Harden Runner
284
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
284
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
285
285
with :
286
286
egress-policy : audit
287
287
@@ -322,7 +322,7 @@ jobs:
322
322
- windows-2022
323
323
steps :
324
324
- name : Harden Runner
325
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
325
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
326
326
with :
327
327
egress-policy : audit
328
328
@@ -370,18 +370,23 @@ jobs:
370
370
api-key : ${{ secrets.DATADOG_API_KEY }}
371
371
372
372
test-go-pg :
373
- runs-on : ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
374
- needs :
375
- - changes
373
+ runs-on : ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'macos-latest-xlarge' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
374
+ needs : changes
376
375
if : needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
377
376
# This timeout must be greater than the timeout set by `go test` in
378
377
# `make test-postgres` to ensure we receive a trace of running
379
378
# goroutines. Setting this to the timeout +5m should work quite well
380
379
# even if some of the preceding steps are slow.
381
380
timeout-minutes : 25
381
+ strategy :
382
+ matrix :
383
+ os :
384
+ - ubuntu-latest
385
+ - macos-latest
386
+ - windows-2022
382
387
steps :
383
388
- name : Harden Runner
384
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
389
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
385
390
with :
386
391
egress-policy : audit
387
392
@@ -396,12 +401,46 @@ jobs:
396
401
- name : Setup Terraform
397
402
uses : ./.github/actions/setup-tf
398
403
404
+ # Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
405
+ - name : Setup ImDisk
406
+ if : runner.os == 'Windows'
407
+ uses : ./.github/actions/setup-imdisk
408
+
399
409
- name : Test with PostgreSQL Database
400
410
env :
401
411
POSTGRES_VERSION : " 13"
402
412
TS_DEBUG_DISCO : " true"
413
+ shell : bash
403
414
run : |
404
- make test-postgres
415
+ # if macOS, install google-chrome for scaletests
416
+ # As another concern, should we really have this kind of external dependency
417
+ # requirement on standard CI?
418
+ if [ "${{ matrix.os }}" == "macos-latest" ]; then
419
+ brew install google-chrome
420
+ fi
421
+
422
+ # By default Go will use the number of logical CPUs, which
423
+ # is a fine default.
424
+ PARALLEL_FLAG=""
425
+
426
+ # macOS will output "The default interactive shell is now zsh"
427
+ # intermittently in CI...
428
+ if [ "${{ matrix.os }}" == "macos-latest" ]; then
429
+ touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile
430
+ fi
431
+
432
+ if [ "${{ runner.os }}" == "Linux" ]; then
433
+ make test-postgres
434
+ elif [ "${{ runner.os }}" == "Windows" ]; then
435
+ # Create a temp dir on the R: ramdisk drive for Windows. The default
436
+ # C: drive is extremely slow: https://github.com/actions/runner-images/issues/8755
437
+ mkdir -p "R:/temp/embedded-pg"
438
+ go run scripts/embedded-pg/main.go -path "R:/temp/embedded-pg"
439
+ DB=ci gotestsum --format standard-quiet -- -v -short -count=1 ./...
440
+ else
441
+ go run scripts/embedded-pg/main.go
442
+ DB=ci gotestsum --format standard-quiet -- -v -short -count=1 ./...
443
+ fi
405
444
406
445
- name : Upload test stats to Datadog
407
446
timeout-minutes : 1
@@ -426,7 +465,7 @@ jobs:
426
465
timeout-minutes : 25
427
466
steps :
428
467
- name : Harden Runner
429
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
468
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
430
469
with :
431
470
egress-policy : audit
432
471
@@ -463,7 +502,7 @@ jobs:
463
502
timeout-minutes : 25
464
503
steps :
465
504
- name : Harden Runner
466
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
505
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
467
506
with :
468
507
egress-policy : audit
469
508
@@ -494,6 +533,47 @@ jobs:
494
533
with :
495
534
api-key : ${{ secrets.DATADOG_API_KEY }}
496
535
536
+ test-go-race-pg :
537
+ runs-on : ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
538
+ needs : changes
539
+ if : needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
540
+ timeout-minutes : 25
541
+ steps :
542
+ - name : Harden Runner
543
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
544
+ with :
545
+ egress-policy : audit
546
+
547
+ - name : Checkout
548
+ uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
549
+ with :
550
+ fetch-depth : 1
551
+
552
+ - name : Setup Go
553
+ uses : ./.github/actions/setup-go
554
+
555
+ - name : Setup Terraform
556
+ uses : ./.github/actions/setup-tf
557
+
558
+ # We run race tests with reduced parallelism because they use more CPU and we were finding
559
+ # instances where tests appear to hang for multiple seconds, resulting in flaky tests when
560
+ # short timeouts are used.
561
+ # c.f. discussion on https://github.com/coder/coder/pull/15106
562
+ - name : Run Tests
563
+ env :
564
+ POSTGRES_VERSION : " 16"
565
+ run : |
566
+ make test-postgres-docker
567
+ DB=ci gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
568
+
569
+ - name : Upload test stats to Datadog
570
+ timeout-minutes : 1
571
+ continue-on-error : true
572
+ uses : ./.github/actions/upload-datadog
573
+ if : always()
574
+ with :
575
+ api-key : ${{ secrets.DATADOG_API_KEY }}
576
+
497
577
# Tailnet integration tests only run when the `tailnet` directory or `go.sum`
498
578
# and `go.mod` are changed. These tests are to ensure we don't add regressions
499
579
# to tailnet, either due to our code or due to updating dependencies.
@@ -508,7 +588,7 @@ jobs:
508
588
timeout-minutes : 20
509
589
steps :
510
590
- name : Harden Runner
511
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
591
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
512
592
with :
513
593
egress-policy : audit
514
594
@@ -534,7 +614,7 @@ jobs:
534
614
timeout-minutes : 20
535
615
steps :
536
616
- name : Harden Runner
537
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
617
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
538
618
with :
539
619
egress-policy : audit
540
620
@@ -566,7 +646,7 @@ jobs:
566
646
name : ${{ matrix.variant.name }}
567
647
steps :
568
648
- name : Harden Runner
569
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
649
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
570
650
with :
571
651
egress-policy : audit
572
652
@@ -586,6 +666,8 @@ jobs:
586
666
name : make gen
587
667
588
668
- run : pnpm build
669
+ env :
670
+ NODE_OPTIONS : ${{ github.repository_owner == 'coder' && '--max_old_space_size=8192' || '' }}
589
671
working-directory : site
590
672
591
673
- run : pnpm playwright:install
@@ -630,7 +712,7 @@ jobs:
630
712
if : needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true'
631
713
steps :
632
714
- name : Harden Runner
633
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
715
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
634
716
with :
635
717
egress-policy : audit
636
718
@@ -707,7 +789,7 @@ jobs:
707
789
708
790
steps :
709
791
- name : Harden Runner
710
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
792
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
711
793
with :
712
794
egress-policy : audit
713
795
@@ -771,6 +853,7 @@ jobs:
771
853
- test-go
772
854
- test-go-pg
773
855
- test-go-race
856
+ - test-go-race-pg
774
857
- test-js
775
858
- test-e2e
776
859
- offlinedocs
@@ -780,7 +863,7 @@ jobs:
780
863
if : always()
781
864
steps :
782
865
- name : Harden Runner
783
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
866
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
784
867
with :
785
868
egress-policy : audit
786
869
@@ -793,6 +876,7 @@ jobs:
793
876
echo "- test-go: ${{ needs.test-go.result }}"
794
877
echo "- test-go-pg: ${{ needs.test-go-pg.result }}"
795
878
echo "- test-go-race: ${{ needs.test-go-race.result }}"
879
+ echo "- test-go-race-pg: ${{ needs.test-go-race-pg.result }}"
796
880
echo "- test-js: ${{ needs.test-js.result }}"
797
881
echo "- test-e2e: ${{ needs.test-e2e.result }}"
798
882
echo "- offlinedocs: ${{ needs.offlinedocs.result }}"
@@ -815,7 +899,7 @@ jobs:
815
899
runs-on : ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }}
816
900
steps :
817
901
- name : Harden Runner
818
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
902
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
819
903
with :
820
904
egress-policy : audit
821
905
@@ -901,7 +985,7 @@ jobs:
901
985
IMAGE : ghcr.io/coder/coder-preview:${{ steps.build-docker.outputs.tag }}
902
986
steps :
903
987
- name : Harden Runner
904
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
988
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
905
989
with :
906
990
egress-policy : audit
907
991
@@ -1037,7 +1121,7 @@ jobs:
1037
1121
id-token : write
1038
1122
steps :
1039
1123
- name : Harden Runner
1040
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
1124
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
1041
1125
with :
1042
1126
egress-policy : audit
1043
1127
@@ -1062,7 +1146,7 @@ jobs:
1062
1146
version : " 2.2.1"
1063
1147
1064
1148
- name : Get Cluster Credentials
1065
- uses : google-github-actions/get-gke-credentials@206d64b64b0eba0a6e2f25113d044c31776ca8d6 # v2.2.2
1149
+ uses : google-github-actions/get-gke-credentials@9025e8f90f2d8e0c3dafc3128cc705a26d992a6a # v2.3.0
1066
1150
with :
1067
1151
cluster_name : dogfood-v2
1068
1152
location : us-central1-a
@@ -1099,7 +1183,7 @@ jobs:
1099
1183
if : github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
1100
1184
steps :
1101
1185
- name : Harden Runner
1102
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
1186
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
1103
1187
with :
1104
1188
egress-policy : audit
1105
1189
@@ -1134,7 +1218,7 @@ jobs:
1134
1218
if : needs.changes.outputs.db == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
1135
1219
steps :
1136
1220
- name : Harden Runner
1137
- uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
1221
+ uses : step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
1138
1222
with :
1139
1223
egress-policy : audit
1140
1224
0 commit comments