dev: use setup-go@v2 and mod cache
This commit is contained in:
parent
3e55c710d4
commit
04f51a5cf4
12
.github/workflows/pr.yml
vendored
12
.github/workflows/pr.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.golang }}
|
go-version: ${{ matrix.golang }}
|
||||||
- name: Run tests on Windows
|
- name: Run tests on Windows
|
||||||
@ -37,9 +37,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.golang }}
|
go-version: ${{ matrix.golang }}
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
- name: Run tests on Unix-like operating systems
|
- name: Run tests on Unix-like operating systems
|
||||||
run: make test
|
run: make test
|
||||||
check_generated:
|
check_generated:
|
||||||
@ -49,7 +55,7 @@ jobs:
|
|||||||
- name: Unshallow
|
- name: Unshallow
|
||||||
run: git fetch --prune --unshallow
|
run: git fetch --prune --unshallow
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.14
|
go-version: 1.14
|
||||||
- name: Check if README.md is up to date
|
- name: Check if README.md is up to date
|
||||||
|
Loading…
x
Reference in New Issue
Block a user