Skip to content

Commit 85bde48

Browse files
committed
build: update tests workflow
- Update actions to their latest versions. - Use SHA to (potentially) allow enabling Dependabot. - Add Go Modules caching using `actions/setup-go` (supported since >=v3). Signed-off-by: Hidde Beydals <[email protected]>
1 parent 40ab611 commit 85bde48

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

.github/workflows/tests.yaml

+15-20
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,14 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
2424
- name: Setup Go
25-
uses: actions/setup-go@v3
25+
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
2626
with:
2727
go-version: 1.20.x
28-
- name: Restore Go cache
29-
uses: actions/cache@v3
30-
with:
31-
path: /home/runner/work/_temp/_github_home/go/pkg/mod
32-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
33-
restore-keys: |
34-
${{ runner.os }}-go-
28+
cache-dependency-path: |
29+
**/go.sum
30+
**/go.mod
3531
- name: Run tests
3632
env:
3733
SKIP_COSIGN_VERIFICATION: true
@@ -45,11 +41,14 @@ jobs:
4541
runs-on: [self-hosted, Linux, ARM64, equinix]
4642
steps:
4743
- name: Checkout
48-
uses: actions/checkout@v3
44+
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
4945
- name: Setup Go
50-
uses: actions/setup-go@v3
46+
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
5147
with:
5248
go-version: 1.20.x
49+
cache-dependency-path: |
50+
**/go.sum
51+
**/go.mod
5352
- name: Run tests
5453
env:
5554
SKIP_COSIGN_VERIFICATION: true
@@ -76,18 +75,14 @@ jobs:
7675
runs-on: ${{ matrix.os }}
7776
steps:
7877
- name: Checkout
79-
uses: actions/checkout@v3
78+
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
8079
- name: Setup Go
81-
uses: actions/setup-go@v3
80+
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
8281
with:
8382
go-version: 1.20.x
84-
- name: Restore Go cache
85-
uses: actions/cache@v3
86-
with:
87-
path: /home/runner/work/_temp/_github_home/go/pkg/mod
88-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
89-
restore-keys: |
90-
${{ runner.os }}-go-
83+
cache-dependency-path: |
84+
**/go.sum
85+
**/go.mod
9186
- name: Install and configure Docker using colima
9287
# Ref: https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
9388
run: |

0 commit comments

Comments
 (0)