Skip to content

Commit

Permalink
Remove use of actions/cache, which conflicts with caching done by `…
Browse files Browse the repository at this point in the history
…actions/setup-go`
  • Loading branch information
SarahFrench committed Feb 24, 2025
1 parent c3b339e commit 46132d8
Showing 1 changed file with 4 additions and 44 deletions.
48 changes: 4 additions & 44 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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.
Expand Down Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down

0 comments on commit 46132d8

Please sign in to comment.