From 98ee51b21ab7479462cb93355f75f5074a526139 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Thu, 2 Jul 2026 14:53:59 -0500 Subject: [PATCH] CI: cache infra/ Go module deps (Pulumi SDKs) to speed up runs setup-go's built-in module cache defaults to keying only on the root go.sum, so the infra/ module's heavy Pulumi SDK dependencies (pulumi/sdk, pulumi-cloudflare, pulumi-gcp) re-downloaded on every run. Set cache-dependency-path to hash both go.sum and infra/go.sum so infra/'s deps are restored from cache. The cache warms on the first (cold) run; the speedup lands on subsequent (warm) runs. Closes #32 Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d43f1c5..3e9127b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,10 +33,20 @@ jobs: - name: Check out repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + # setup-go's built-in module cache (enabled by default) keys the cache on + # go.sum, but defaults to only the root module's go.sum. This job also + # vets/tests the infra/ module, whose go.sum pulls the heavy Pulumi SDKs + # (pulumi/sdk, pulumi-cloudflare, pulumi-gcp). Point cache-dependency-path + # at both go.sum files so infra/'s deps are restored from cache instead of + # re-downloaded every run. The cache is populated on the first (cold) run + # and speeds up subsequent (warm) runs. - name: Set up Go uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: go-version: '1.26' + cache-dependency-path: | + go.sum + infra/go.sum # TinyGo is needed only for the Wasm Worker build (pnpm run build). # install-binaryen (default true) provides wasm-opt, which TinyGo invokes