Skip to content

Commit d6c1828

Browse files
committed
try ramdisk with postgres
1 parent 9945074 commit d6c1828

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,29 @@ jobs:
368368
- name: Setup Terraform
369369
uses: ./.github/actions/setup-tf
370370

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+
371394
- name: Test with PostgreSQL Database
372395
env:
373396
POSTGRES_VERSION: "13"
@@ -394,10 +417,10 @@ jobs:
394417
if [ "${{ runner.os }}" == "Linux" ]; then
395418
make test-postgres
396419
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"
401424
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 ./...
402425
else
403426
go run scripts/embedded-pg/main.go

0 commit comments

Comments
 (0)