ci(.github): remove the go-cache action (#27250)

Closes https://github.com/coder/internal/issues/1619
Closes ENG-3039
Closes https://github.com/coder/internal/issues/1002
Closes ENG-3018

The `test-go-pg` Go cache grew until the post-job save could no longer
complete within the job timeout, cancelling the job on every `main` run.

Depot runners already provide remote Go build caching via
[`GOCACHEPROG`](https://depot.dev/docs/cache/integrations/gocache),
which writes every object it serves into `GOCACHE` and never evicts, so
persisting `GOCACHE` with `actions/cache` on top just carries an
ever-growing directory forward. #20510 removed the custom build cache
steps for exactly this reason, and the `go-cache` action introduced in
#25727 unintentionally reinstated them.

The action is now removed entirely, along with its module cache
persistence: a full cache miss plus cold `go mod download` on a Depot
runner takes about 10 seconds, faster than any warm `actions/cache`
restore of the module cache was.

`setup-go-paths` is kept, as it points `GOCACHE` and friends at the
Windows RAM disk, but its now-unused caching-related outputs are
removed.
This commit is contained in:
Ethan
2026-07-15 18:35:18 +10:00
committed by GitHub
parent cc11c8a536
commit 304f127d34
7 changed files with 0 additions and 152 deletions
-3
View File
@@ -41,9 +41,6 @@ jobs:
with:
install-args: "go"
- name: Restore Go cache
uses: ./.github/actions/go-cache
- name: Initialize CodeQL
uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v3.29.5
with: