Cache Go modules
@@ -4,16 +4,22 @@ jobs:
test:
strategy:
matrix:
- go-version: [1.14.x, 1.15.x]
+ go-version: [1.14, 1.15]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
- uses: actions/setup-go@v1
+ uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ with:
+ path: ~/go/pkg/mod
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ restore-keys: |
+ ${{ runner.os }}-go-
- name: Lint
if: matrix.os != 'windows-latest'
run: |
