From a703cdaeab260f9ab879f02f6e01043d87beab97 Mon Sep 17 00:00:00 2001 From: Sarah French <15078782+SarahFrench@users.noreply.github.com> Date: Tue, 25 Feb 2025 08:36:33 +0000 Subject: [PATCH] Remove use of `actions/cache`, which conflicts with caching done by `actions/setup-go` (#36571) --- .github/workflows/checks.yml | 48 +++--------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 38a82ffd23..4ede249990 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -51,17 +51,7 @@ jobs: uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.version }} - - # NOTE: This cache is shared so the following step must always be - # identical across the unit-tests, e2e-tests, and consistency-checks - # jobs, or else weird things could happen. - - name: Cache Go modules - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - with: - path: "~/go/pkg" - key: go-mod-${{ hashFiles('go.sum') }} - restore-keys: | - go-mod- + cache-dependency-path: go.sum - name: "Unit tests" run: | @@ -86,17 +76,7 @@ jobs: uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.version }} - - # NOTE: This cache is shared so the following step must always be - # identical across the unit-tests, e2e-tests, and consistency-checks - # jobs, or else weird things could happen. - - name: Cache Go modules - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - with: - path: "~/go/pkg" - key: go-mod-${{ hashFiles('go.sum') }} - restore-keys: | - go-mod- + cache-dependency-path: go.sum # The race detector add significant time to the unit tests, so only run # it for select packages. @@ -124,17 +104,7 @@ jobs: uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.version }} - - # NOTE: This cache is shared so the following step must always be - # identical across the unit-tests, e2e-tests, and consistency-checks - # jobs, or else weird things could happen. - - name: Cache Go modules - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - with: - path: "~/go/pkg" - key: go-mod-${{ hashFiles('go.sum') }} - restore-keys: | - go-mod- + cache-dependency-path: go.sum - name: "End-to-end tests" run: | @@ -158,17 +128,7 @@ jobs: uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.version }} - - # NOTE: This cache is shared so the following step must always be - # identical across the unit-tests, e2e-tests, and consistency-checks - # jobs, or else weird things could happen. - - name: Cache Go modules - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - with: - path: "~/go/pkg" - key: go-mod-${{ hashFiles('go.sum') }} - restore-keys: | - go-mod- + cache-dependency-path: go.sum - name: "go.mod and go.sum consistency check" run: |