File tree 2 files changed +23
-10
lines changed 2 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 1
1
name : " Setup Go"
2
2
description : |
3
3
Sets up the Go environment for tests, builds, etc.
4
+ inputs :
5
+ version :
6
+ description : " The Go version to use."
7
+ default : " 1.20.5"
4
8
runs :
5
9
using : " composite"
6
10
steps :
11
+ - name : Cache go toolchain
12
+ uses : buildjet/cache@v3
13
+ with :
14
+ path : |
15
+ ${{ env.RUNNER_TOOL_CACHE }}/go/${{ inputs.version }}
16
+ key : gotoolchain-${{ runner.os }}-${{ inputs.version }}
17
+ restore-keys : |
18
+ gotoolchain-${{ runner.os }}-
19
+
7
20
- uses : buildjet/setup-go@v4
8
21
with :
9
22
# We do our own caching for implementation clarity.
10
23
cache : false
11
- go-version : " 1.20.5 "
24
+ go-version : ${{ inputs.version }}
12
25
13
26
- name : Cache go
14
27
uses : buildjet/cache@v3
@@ -21,11 +34,11 @@ runs:
21
34
~/Library/Caches/go-build
22
35
# Job name must be included in the key for effective
23
36
# test cache reuse.
24
- key : go -${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.go', 'go.**') }}
37
+ key : gocache -${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.go', 'go.**') }}
25
38
restore-keys : |
26
- go -${{ runner.os }}-${{ github.job }}-
27
- go -${{ runner.os }}-
28
- go -
39
+ gocache -${{ runner.os }}-${{ github.job }}-
40
+ gocache -${{ runner.os }}-
41
+ gocache -
29
42
30
43
- name : Install gotestsum
31
44
uses : jaxxstorm/action-install-gh-release@v1.10.0
Original file line number Diff line number Diff line change @@ -161,11 +161,11 @@ jobs:
161
161
162
162
- name : go install tools
163
163
run : |
164
- go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30 \
165
- storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33 \
166
- golang.org/x/tools/cmd/goimports@latest \
167
- github.com/mikefarah/yq/v4@v4.30.6 \
168
- github.com/golang/mock/mockgen@v1.6.0
164
+ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
165
+ go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33
166
+ go install golang.org/x/tools/cmd/goimports@latest
167
+ go install github.com/mikefarah/yq/v4@v4.30.6
168
+ go install github.com/golang/mock/mockgen@v1.6.0
169
169
170
170
- name : Install Protoc
171
171
run : |
You can’t perform that action at this time.
0 commit comments