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
|
@ -19,22 +19,11 @@ jobs:
|
|||
- name: Unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
- name: Setup Go
|
||||
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
|
||||
|
|
|
@ -11,10 +11,11 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
- name: Unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
- name: Setup Go
|
||||
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