dev: use setup-go@v2 and mod cache

This commit is contained in:
Aleksandr Razumov 2020-05-04 15:17:49 +03:00
parent 3e55c710d4
commit 04f51a5cf4
No known key found for this signature in database
GPG Key ID: 1D14A82D2E311045

View File

@ -18,7 +18,7 @@ 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 }}
- name: Run tests on Windows - name: Run tests on Windows
@ -37,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-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- 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:
@ -49,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