mirror of
https://github.com/spf13/cobra
synced 2025-05-05 04:47:22 +00:00
ci: use action/setup-go's cache
This commit is contained in:
parent
d689184a42
commit
404ade0cb6
1 changed files with 6 additions and 8 deletions
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
|
@ -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
|
||||||
|
|
||||||
|
@ -43,17 +46,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
|
||||||
|
|
Loading…
Add table
Reference in a new issue