ci cache modules
This commit is contained in:
parent
1648976047
commit
5a63112f53
1 changed files with 22 additions and 2 deletions
24
.github/workflows/go.yml
vendored
24
.github/workflows/go.yml
vendored
|
@ -1,5 +1,17 @@
|
|||
name: Go
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
jobs:
|
||||
|
||||
test:
|
||||
|
@ -14,9 +26,10 @@ jobs:
|
|||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v1
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set GOPATH
|
||||
# temporary fix
|
||||
|
@ -26,6 +39,13 @@ jobs:
|
|||
echo "##[add-path]$(dirname $GITHUB_WORKSPACE)/bin"
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get -u -v golang.org/x/lint/golint
|
||||
|
|
Loading…
Reference in a new issue