mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -332,9 +332,6 @@ jobs:
|
||||
- name: Install pnpm dependencies
|
||||
uses: ./.github/actions/pnpm-install
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:github.com/golangci/golangci-lint/cmd/golangci-lint go:github.com/coder/paralleltestctx/cmd/paralleltestctx
|
||||
|
||||
@@ -445,9 +442,6 @@ jobs:
|
||||
- name: Install pnpm dependencies
|
||||
uses: ./.github/actions/pnpm-install
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:storj.io/drpc/cmd/protoc-gen-go-drpc go:github.com/coder/sqlc/cmd/sqlc
|
||||
|
||||
@@ -506,9 +500,6 @@ jobs:
|
||||
- name: Install pnpm dependencies
|
||||
uses: ./.github/actions/pnpm-install
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:mvdan.cc/sh/v3/cmd/shfmt
|
||||
|
||||
@@ -571,7 +562,6 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Go Paths
|
||||
id: go-paths
|
||||
uses: ./.github/actions/setup-go-paths
|
||||
|
||||
- name: Setup GNU tools (macOS)
|
||||
@@ -582,11 +572,6 @@ jobs:
|
||||
with:
|
||||
install-args: "go terraform"
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
with:
|
||||
cache-path: ${{ steps.go-paths.outputs.cached-dirs }}
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:gotest.tools/gotestsum go:github.com/slsyy/mtimehash/cmd/mtimehash
|
||||
|
||||
@@ -762,9 +747,6 @@ jobs:
|
||||
with:
|
||||
install-args: "go terraform"
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:gotest.tools/gotestsum
|
||||
|
||||
@@ -836,9 +818,6 @@ jobs:
|
||||
with:
|
||||
install-args: "go terraform"
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:gotest.tools/gotestsum
|
||||
|
||||
@@ -920,9 +899,6 @@ jobs:
|
||||
with:
|
||||
install-args: "go"
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
# Used by some integration tests.
|
||||
- name: Install Nginx
|
||||
run: sudo apt-get update && sudo apt-get install -y nginx
|
||||
@@ -993,9 +969,6 @@ jobs:
|
||||
- name: Install pnpm dependencies
|
||||
uses: ./.github/actions/pnpm-install
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
# Assume that the checked-in versions are up-to-date
|
||||
- run: make gen/mark-fresh
|
||||
name: make gen
|
||||
@@ -1120,9 +1093,6 @@ jobs:
|
||||
with:
|
||||
directory: offlinedocs
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:storj.io/drpc/cmd/protoc-gen-go-drpc go:github.com/coder/sqlc/cmd/sqlc
|
||||
|
||||
@@ -1224,9 +1194,6 @@ jobs:
|
||||
- name: Install pnpm dependencies
|
||||
uses: ./.github/actions/pnpm-install
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:github.com/tc-hib/go-winres go:github.com/goreleaser/nfpm/v2/cmd/nfpm
|
||||
|
||||
@@ -1287,9 +1254,6 @@ jobs:
|
||||
- name: Install pnpm dependencies
|
||||
uses: ./.github/actions/pnpm-install
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:github.com/tc-hib/go-winres go:github.com/goreleaser/nfpm/v2/cmd/nfpm
|
||||
|
||||
@@ -1646,9 +1610,6 @@ jobs:
|
||||
with:
|
||||
install-args: "go"
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:github.com/coder/sqlc/cmd/sqlc
|
||||
|
||||
|
||||
@@ -47,9 +47,6 @@ jobs:
|
||||
with:
|
||||
install-args: "go"
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:github.com/coder/whichtests go:gotest.tools/gotestsum
|
||||
|
||||
|
||||
@@ -67,9 +67,6 @@ jobs:
|
||||
with:
|
||||
install-args: "go terraform"
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:gotest.tools/gotestsum
|
||||
|
||||
|
||||
@@ -246,9 +246,6 @@ jobs:
|
||||
- name: Install pnpm dependencies
|
||||
uses: ./.github/actions/pnpm-install
|
||||
|
||||
- name: Restore Go cache
|
||||
uses: ./.github/actions/go-cache
|
||||
|
||||
- name: Install Go mise tools
|
||||
run: ./.github/scripts/retry.sh -- mise install --locked go:github.com/coder/sqlc/cmd/sqlc
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user