Skip to content

Commit 5e8efba

Browse files
authored
fix: checkout repo before setting up go environment (#1390)
This change ensures that the `go.sum` file used by the `actions/setup-go` action as the cache identifier exists in the working tree. Closes: #1382 Change-Id: I0318bfa6e7d7859baf6600ff71715eaef92b401b
1 parent 73122de commit 5e8efba

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
platform: [ubuntu-latest, macos-latest, windows-latest]
1212
runs-on: ${{ matrix.platform }}
1313
steps:
14+
- name: Check out code
15+
uses: actions/checkout@v4
16+
1417
- name: Set up Go ${{ matrix.go-version }}
1518
uses: actions/setup-go@v5
1619
with:
1720
go-version: ${{ matrix.go-version }}
1821

19-
- name: Check out code
20-
uses: actions/checkout@v4
21-
2222
- name: Build
2323
run: make
2424

.github/workflows/trunk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
contents: write
3030
deployments: write
3131
steps:
32+
- uses: actions/checkout@v4
33+
3234
- uses: actions/setup-go@v5
3335
with:
3436
go-version: 1.24.2
3537

36-
- uses: actions/checkout@v4
37-
3838
- name: Run benchmark
3939
run: go test -v ./... -bench=. -run=xxx -benchmem | tee output.txt
4040

0 commit comments

Comments
 (0)