@@ -368,6 +368,29 @@ jobs:
368
368
- name : Setup Terraform
369
369
uses : ./.github/actions/setup-tf
370
370
371
+ - name : Download ImDisk
372
+ if : runner.os == 'Windows'
373
+ shell : bash
374
+ run : |
375
+ mkdir imdisk
376
+ cd imdisk
377
+ curl -L -o files.cab https://imdisk-ci-files.pages.dev/ImDiskTk20241123/files.cab
378
+ curl -L -o install.bat https://imdisk-ci-files.pages.dev/ImDiskTk20241123/install.bat
379
+ cd ..
380
+
381
+ - name : Install ImDisk
382
+ if : runner.os == 'Windows'
383
+ shell : cmd
384
+ run : |
385
+ cd imdisk
386
+ install.bat /silent
387
+
388
+ - name : Create RAM Disk
389
+ if : runner.os == 'Windows'
390
+ shell : cmd
391
+ run : |
392
+ imdisk -a -s 4096M -m R: -p "/fs:ntfs /q /y"
393
+
371
394
- name : Test with PostgreSQL Database
372
395
env :
373
396
POSTGRES_VERSION : " 13"
@@ -394,10 +417,10 @@ jobs:
394
417
if [ "${{ runner.os }}" == "Linux" ]; then
395
418
make test-postgres
396
419
elif [ "${{ runner.os }}" == "Windows" ]; then
397
- # Create temp dir on D: drive for Windows. The default C: drive is extremely
398
- # slow: https://github.com/actions/runner-images/issues/8755
399
- mkdir -p "D :/temp/embedded-pg"
400
- go run scripts/embedded-pg/main.go -path "D :/temp/embedded-pg"
420
+ # Create temp dir on the R: ramdisk drive for Windows. The default
421
+ # C: drive is extremely slow: https://github.com/actions/runner-images/issues/8755
422
+ mkdir -p "R :/temp/embedded-pg"
423
+ go run scripts/embedded-pg/main.go -path "R :/temp/embedded-pg"
401
424
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 ./...
402
425
else
403
426
go run scripts/embedded-pg/main.go
0 commit comments