ci(windows): add RAM disk for faster test I/O

Use chad-golden/setup-ramdisk@v1 to create a 4GB RAM disk (R:) on
Windows runners. Benchmarks show ~1750x faster IOPS compared to
the C: drive (247k vs 140 IOPS).

Redirect all test temp files, GOCACHE, and GOMODCACHE to the RAM
disk. This should dramatically speed up SQLite tests and other
disk-intensive operations that were causing 30+ minute timeouts.

Closes bd-5we

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-13 10:19:05 +11:00
parent 9351fa7aa5
commit b350b4cf82

View File

@@ -58,6 +58,14 @@ jobs:
steps:
- uses: actions/checkout@v6
# RAM disk provides ~1750x faster IOPS than Windows C: drive
# This dramatically speeds up SQLite tests and temp file operations
- name: Setup RAM Disk
uses: chad-golden/setup-ramdisk@v1
with:
size-in-mb: 4096
drive-letter: 'R'
- name: Set up Go
uses: actions/setup-go@v5
with:
@@ -72,7 +80,15 @@ jobs:
run: go build -v ./cmd/bd
- name: Test cmd package
run: go test -v -short -timeout=30m -parallel=4 ./cmd/...
env:
TMPDIR: R:\tmp
TEMP: R:\tmp
TMP: R:\tmp
GOCACHE: R:\go-cache
GOMODCACHE: R:\go-mod
run: |
New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod
go test -v -short -timeout=30m -parallel=4 ./cmd/...
test-windows-internal:
name: Test (Windows - internal)
@@ -81,6 +97,14 @@ jobs:
steps:
- uses: actions/checkout@v6
# RAM disk provides ~1750x faster IOPS than Windows C: drive
# This dramatically speeds up SQLite tests and temp file operations
- name: Setup RAM Disk
uses: chad-golden/setup-ramdisk@v1
with:
size-in-mb: 4096
drive-letter: 'R'
- name: Set up Go
uses: actions/setup-go@v5
with:
@@ -92,7 +116,15 @@ jobs:
git config --global user.email "ci@beads.test"
- name: Test internal packages
run: go test -v -short -timeout=30m -parallel=4 ./internal/...
env:
TMPDIR: R:\tmp
TEMP: R:\tmp
TMP: R:\tmp
GOCACHE: R:\go-cache
GOMODCACHE: R:\go-mod
run: |
New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod
go test -v -short -timeout=30m -parallel=4 ./internal/...
lint:
name: Lint