perf: cache go modules and build output in CI (#8)

The Dockerfile uses BuildKit cache mounts so module downloads and compiled
packages survive a go.sum bump, and the test job restores the runner-local
cache server that act_runner already exposes.
This commit is contained in:
2026-11-04 17:37:05 -08:00
parent b02271f033
commit 120f64c3db
2 changed files with 19 additions and 3 deletions
+9
View File
@@ -38,6 +38,15 @@ jobs:
- name: Install node for JS actions
run: apk add --no-cache nodejs
- uses: actions/checkout@v4
# act_runner injects ACTIONS_CACHE_URL, so this hits the runner-local
# cache server (config: cache.dir) instead of re-downloading modules.
- uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: go-${{ hashFiles('go.sum') }}
restore-keys: go-
- run: go vet ./... && go test ./...
image: