@@ -313,7 +313,7 @@ jobs:
313
313
run : ./scripts/check_unstaged.sh
314
314
315
315
test-go :
316
- 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 }}
316
+ 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' && 'depot- windows-2022 -16' || matrix.os }}
317
317
needs : changes
318
318
if : needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
319
319
timeout-minutes : 20
@@ -326,17 +326,31 @@ jobs:
326
326
- windows-2022
327
327
steps :
328
328
- name : Harden Runner
329
+ # Harden Runner is only supported on Ubuntu runners.
330
+ if : runner.os == 'Linux'
329
331
uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
330
332
with :
331
333
egress-policy : audit
332
334
335
+ # Set up RAM disks to speed up the rest of the job. This action is in
336
+ # a separate repository to allow its use before actions/checkout.
337
+ - name : Setup RAM Disks
338
+ if : runner.os == 'Windows'
339
+ uses : coder/setup-ramdisk-action@fbbd000cb83aff384a5f457c9073135189a4cf55
340
+
333
341
- name : Checkout
334
342
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
335
343
with :
336
344
fetch-depth : 1
337
345
338
346
- name : Setup Go
339
347
uses : ./.github/actions/setup-go
348
+ with :
349
+ # Runners have Go baked-in and Go will automatically
350
+ # download the toolchain configured in go.mod, so we don't
351
+ # need to reinstall it. It's faster on Windows runners.
352
+ use-preinstalled-go : ${{ runner.os == 'Windows' }}
353
+ use-temp-cache-dirs : ${{ runner.os == 'Windows' }}
340
354
341
355
- name : Setup Terraform
342
356
uses : ./.github/actions/setup-tf
0 commit comments