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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
golang:
|
golang:
|
||||||
- 1.12
|
|
||||||
- 1.13
|
- 1.13
|
||||||
- 1.14
|
- 1.14
|
||||||
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
|
||||||
@ -30,7 +29,6 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
golang:
|
golang:
|
||||||
- 1.12
|
|
||||||
- 1.13
|
- 1.13
|
||||||
- 1.14
|
- 1.14
|
||||||
os:
|
os:
|
||||||
@ -39,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-${{ matrix.golang }}-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-${{ matrix.golang }}-
|
||||||
- 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:
|
||||||
@ -51,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