mirror of
https://github.com/spf13/cobra
synced 2024-11-05 05:17:12 +00:00
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:
parent
7e289f46f1
commit
4065a33bfd
1 changed files with 6 additions and 9 deletions
15
.github/workflows/test.yml
vendored
15
.github/workflows/test.yml
vendored
|
@ -13,10 +13,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '^1.19'
|
||||
check-latest: true
|
||||
cache: true
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -33,7 +36,6 @@ jobs:
|
|||
- ubuntu
|
||||
- macOS
|
||||
go:
|
||||
- 14
|
||||
- 15
|
||||
- 16
|
||||
- 17
|
||||
|
@ -43,17 +45,12 @@ jobs:
|
|||
runs-on: ${{ matrix.platform }}-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.${{ matrix.go }}.x
|
||||
|
||||
- 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-
|
||||
cache: true
|
||||
|
||||
- run: |
|
||||
export GOBIN=$HOME/go/bin
|
||||
|
|
Loading…
Reference in a new issue