25
25
uses : actions/cache@v3
26
26
with :
27
27
path : |
28
- /home/runner /go/bin
29
- /home/runner /go/pkg/mod
28
+ ~ /go/bin
29
+ ~ /go/pkg/mod
30
30
key : go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
31
31
- name : Install dependencies
32
32
if : steps.go-cache.outputs.cache-hit != 'true'
53
53
uses : actions/cache@v3
54
54
with :
55
55
path : |
56
- /home/runner /go/bin
57
- /home/runner /go/pkg/mod
56
+ ~ /go/bin
57
+ ~ /go/pkg/mod
58
58
key : go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
59
59
- name : golint
60
60
run : make -j2 golint
80
80
uses : actions/cache@v3
81
81
with :
82
82
path : |
83
- /home/runner /go/bin
84
- /home/runner /go/pkg/mod
83
+ ~ /go/bin
84
+ ~ /go/pkg/mod
85
85
key : go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
86
86
- name : checklicense
87
87
run : make checklicense
@@ -133,14 +133,14 @@ jobs:
133
133
uses : actions/cache@v3
134
134
with :
135
135
path : |
136
- /home/runner /go/bin
137
- /home/runner /go/pkg/mod
136
+ ~ /go/bin
137
+ ~ /go/pkg/mod
138
138
key : go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
139
139
- name : Cache Build
140
140
uses : actions/cache@v3
141
141
with :
142
- path : /home/runner /.cache/go-build
143
- key : go-build- unittest-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
142
+ path : ~ /.cache/go-build
143
+ key : unittest-${{ runner.os }}-go-build-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
144
144
- name : Run Unit Tests
145
145
run : make gotest
146
146
test-coverage :
@@ -162,14 +162,14 @@ jobs:
162
162
uses : actions/cache@v3
163
163
with :
164
164
path : |
165
- /home/runner /go/bin
166
- /home/runner /go/pkg/mod
165
+ ~ /go/bin
166
+ ~ /go/pkg/mod
167
167
key : go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
168
168
- name : Cache Build
169
169
uses : actions/cache@v3
170
170
with :
171
- path : /home/runner /.cache/go-build
172
- key : go-build- coverage-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
171
+ path : ~ /.cache/go-build
172
+ key : coverage-${{ runner.os }}-go-build -${{ hashFiles('**/go.sum') }}
173
173
- name : Run Unit Tests With Coverage
174
174
run : make gotest-with-cover
175
175
- name : Upload coverage report
@@ -221,8 +221,8 @@ jobs:
221
221
uses : actions/cache@v3
222
222
with :
223
223
path : |
224
- /home/runner /go/bin
225
- /home/runner /go/pkg/mod
224
+ ~ /go/bin
225
+ ~ /go/pkg/mod
226
226
key : go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
227
227
- name : Build
228
228
env :
0 commit comments