ci cache modules

This commit is contained in:
Evgeniy Kulikov 2020-03-16 18:43:48 +03:00
parent 1648976047
commit 5a63112f53
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2

View file

@ -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