ci: use action/setup-go's cache (#1783)

* ci: use action/setup-go's cache
* ci: deprecate Golang 1.14
This commit is contained in:
Unai Martinez-Corral 2022-09-14 05:31:59 +02:00 committed by GitHub
parent 7e289f46f1
commit 4065a33bfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,10 +13,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3 - uses: actions/setup-go@v3
with: with:
go-version: '^1.19' go-version: '^1.19'
check-latest: true check-latest: true
cache: true
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -33,7 +36,6 @@ jobs:
- ubuntu - ubuntu
- macOS - macOS
go: go:
- 14
- 15 - 15
- 16 - 16
- 17 - 17
@ -43,17 +45,12 @@ jobs:
runs-on: ${{ matrix.platform }}-latest runs-on: ${{ matrix.platform }}-latest
steps: steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3 - uses: actions/setup-go@v3
with: with:
go-version: 1.${{ matrix.go }}.x go-version: 1.${{ matrix.go }}.x
cache: true
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x-
- run: | - run: |
export GOBIN=$HOME/go/bin export GOBIN=$HOME/go/bin