mirror of https://github.com/databricks/cli.git
Use actions/setup-go@v3 with caching support (#41)
This commit is contained in:
parent
2e12a2aa01
commit
d214f44df4
|
@ -20,21 +20,10 @@ jobs:
|
|||
run: git fetch --prune --unshallow
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v1
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18.x
|
||||
|
||||
- name: Cache packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
/opt/hostedtoolcache/go
|
||||
vendor
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
cache: true
|
||||
|
||||
- name: Set go env
|
||||
run: |
|
||||
|
@ -53,12 +42,17 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18.x
|
||||
|
||||
# No need to download cached dependencies when running gofmt.
|
||||
cache: false
|
||||
|
||||
- name: Run gofmt
|
||||
run: |
|
||||
# -l: list files that were reformatted
|
||||
|
|
|
@ -12,9 +12,10 @@ jobs:
|
|||
- name: Unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
cache: true
|
||||
- name: Import GPG key
|
||||
id: import_gpg
|
||||
uses: hashicorp/ghaction-import-gpg@v2.1.0
|
||||
|
|
Loading…
Reference in New Issue