File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 8
8
os : [ubuntu-latest, macos-latest, windows-latest]
9
9
runs-on : ${{ matrix.os }}
10
10
steps :
11
- - uses : actions/setup-go@v2
11
+ - uses : actions/setup-go@v3
12
12
with :
13
13
go-version : ${{ matrix.go-version }}
14
- - uses : actions/checkout@v2
14
+ - uses : actions/checkout@v3
15
15
- run : go test ./...
16
16
17
17
test-cache :
18
18
runs-on : ubuntu-latest
19
19
steps :
20
- - uses : actions/setup-go@v2
20
+ - uses : actions/setup-go@v3
21
21
with :
22
22
go-version : 1.17.x
23
- - uses : actions/checkout@v2
23
+ - uses : actions/checkout@v3
24
24
- uses : actions/cache@v2
25
25
with :
26
26
# In order:
32
32
~/go/pkg/mod
33
33
~/.cache/go-build
34
34
~/Library/Caches/go-build
35
- %LocalAppData% \go-build
36
- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
35
+ ~\AppData\Local \go-build
36
+ key : ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
37
37
restore-keys : |
38
- ${{ runner.os }}-go-
38
+ ${{ runner.os }}-go-${{ matrix.go-version }}-
39
39
- run : go test ./...
Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ jobs:
17
17
os : [ubuntu-latest, macos-latest, windows-latest]
18
18
runs-on : ${{ matrix.os }}
19
19
steps :
20
- - uses : actions/setup-go@v2
20
+ - uses : actions/setup-go@v3
21
21
with :
22
22
go-version : ${{ matrix.go-version }}
23
- - uses : actions/checkout@v2
23
+ - uses : actions/checkout@v3
24
24
- run : go test ./...
25
25
` ` `
26
26
@@ -100,10 +100,10 @@ You can also include Go's build cache, to improve incremental builds:
100
100
~/go/pkg/mod
101
101
~/.cache/go-build
102
102
~/Library/Caches/go-build
103
- %LocalAppData% \g o-build
104
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
103
+ ~ \A ppData \L ocal \g o-build
104
+ key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
105
105
restore-keys: |
106
- ${{ runner.os }}-go-
106
+ ${{ runner.os }}-go-${{ matrix.go-version }}-
107
107
` ` `
108
108
109
109
This is demonstrated via the `test-cache` job [in this very repository](https://github.com/mvdan/github-actions-golang/actions).
@@ -201,7 +201,7 @@ jobs:
201
201
run:
202
202
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
203
203
steps:
204
- - uses: actions/checkout@v2
204
+ - uses: actions/checkout@v3
205
205
with:
206
206
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
207
207
` ` `
You can’t perform that action at this time.
0 commit comments