Skip to content

Commit 04f51a5

Browse files
committed
dev: use setup-go@v2 and mod cache
1 parent 3e55c71 commit 04f51a5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/pr.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v2
2020
- name: Install Go
21-
uses: actions/setup-go@v1
21+
uses: actions/setup-go@v2
2222
with:
2323
go-version: ${{ matrix.golang }}
2424
- name: Run tests on Windows
@@ -37,9 +37,15 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@v2
3939
- name: Install Go
40-
uses: actions/setup-go@v1
40+
uses: actions/setup-go@v2
4141
with:
4242
go-version: ${{ matrix.golang }}
43+
- uses: actions/cache@v1
44+
with:
45+
path: ~/go/pkg/mod
46+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
47+
restore-keys: |
48+
${{ runner.os }}-go-
4349
- name: Run tests on Unix-like operating systems
4450
run: make test
4551
check_generated:
@@ -49,7 +55,7 @@ jobs:
4955
- name: Unshallow
5056
run: git fetch --prune --unshallow
5157
- name: Install Go
52-
uses: actions/setup-go@v1
58+
uses: actions/setup-go@v2
5359
with:
5460
go-version: 1.14
5561
- name: Check if README.md is up to date

0 commit comments

Comments
 (0)