Merge pull request #1069 from golangci/feature/github-actions-mod-cache
dev: add mod cache in gh actions
This commit is contained in:
commit
01b726a048
14
.github/workflows/pr.yml
vendored
14
.github/workflows/pr.yml
vendored
@ -13,13 +13,12 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
golang:
|
||||
- 1.12
|
||||
- 1.13
|
||||
- 1.14
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v1
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.golang }}
|
||||
- name: Run tests on Windows
|
||||
@ -30,7 +29,6 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
golang:
|
||||
- 1.12
|
||||
- 1.13
|
||||
- 1.14
|
||||
os:
|
||||
@ -39,9 +37,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v1
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.golang }}
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ matrix.golang }}-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-${{ matrix.golang }}-
|
||||
- name: Run tests on Unix-like operating systems
|
||||
run: make test
|
||||
check_generated:
|
||||
@ -51,7 +55,7 @@ jobs:
|
||||
- name: Unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v1
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14
|
||||
- name: Check if README.md is up to date
|
||||
|
Loading…
x
Reference in New Issue
Block a user