@@ -23,13 +23,15 @@ jobs:
2323 echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
2424 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
2525 shell : bash
26- - name : Cache Go Modules
26+ - name : Cache Go
2727 uses : actions/cache@v2
2828 env :
2929 cache-name : cache-go-modules
3030 with :
31- path : \Users\runneradmin\go\pkg\mod
32- key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
31+ path : |
32+ \Users\runneradmin\go\pkg\mod
33+ %LocalAppData%\go-build
34+ key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod', '**/go.sum') }}
3335 - name : Run Unit tests
3436 run : go test ./...
3537 - name : GitHub Issue Generator
@@ -51,17 +53,21 @@ jobs:
5153 run : |
5254 echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
5355 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
54- - name : Cache Go Modules
56+ - name : Cache Go
5557 id : module-cache
5658 uses : actions/cache@v2
5759 env :
5860 cache-name : cache-go-modules
5961 with :
60- path : /home/runner/go/pkg/mod
61- key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.mod') }}
62- - name : Download dependencies
62+ path : |
63+ /home/runner/go/pkg/mod
64+ /home/runner/.cache/go-build
65+ key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.mod', '**/go.sum') }}
66+ - name : Install dependencies
6367 if : steps.module-cache.outputs.cache-hit != 'true'
64- run : go mod download
68+ run : |
69+ make gomoddownload
70+ make gotestinstall
6571 - name : Cache Tools
6672 id : tool-cache
6773 uses : actions/cache@v2
@@ -90,13 +96,16 @@ jobs:
9096 run : |
9197 echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
9298 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
93- - name : Cache Go Modules
99+ - name : Cache Go
100+ id : module-cache
94101 uses : actions/cache@v2
95102 env :
96103 cache-name : cache-go-modules
97104 with :
98- path : /home/runner/go/pkg/mod
99- key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
105+ path : |
106+ /home/runner/go/pkg/mod
107+ /home/runner/.cache/go-build
108+ key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.mod', '**/go.sum') }}
100109 - name : Cache Tools
101110 id : tool-cache
102111 uses : actions/cache@v2
@@ -129,13 +138,16 @@ jobs:
129138 run : |
130139 echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
131140 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
132- - name : Cache Go Modules
141+ - name : Cache Go
142+ id : module-cache
133143 uses : actions/cache@v2
134144 env :
135145 cache-name : cache-go-modules
136146 with :
137- path : /home/runner/go/pkg/mod
138- key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
147+ path : |
148+ /home/runner/go/pkg/mod
149+ /home/runner/.cache/go-build
150+ key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.mod', '**/go.sum') }}
139151 - name : Cache Tools
140152 id : tool-cache
141153 uses : actions/cache@v2
@@ -170,13 +182,16 @@ jobs:
170182 run : |
171183 echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
172184 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
173- - name : Cache Go Modules
185+ - name : Cache Go
186+ id : module-cache
174187 uses : actions/cache@v2
175188 env :
176189 cache-name : cache-go-modules
177190 with :
178- path : /home/runner/go/pkg/mod
179- key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
191+ path : |
192+ /home/runner/go/pkg/mod
193+ /home/runner/.cache/go-build
194+ key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.mod', '**/go.sum') }}
180195 - name : Cache Tools
181196 id : tool-cache
182197 uses : actions/cache@v2
@@ -211,13 +226,16 @@ jobs:
211226 run : |
212227 echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
213228 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
214- - name : Cache Go Modules
229+ - name : Cache Go
230+ id : module-cache
215231 uses : actions/cache@v2
216232 env :
217233 cache-name : cache-go-modules
218234 with :
219- path : /home/runner/go/pkg/mod
220- key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
235+ path : |
236+ /home/runner/go/pkg/mod
237+ /home/runner/.cache/go-build
238+ key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.mod', '**/go.sum') }}
221239 - name : Cache Tools
222240 id : tool-cache
223241 uses : actions/cache@v2
@@ -267,13 +285,16 @@ jobs:
267285 run : |
268286 echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
269287 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
270- - name : Cache Go Modules
288+ - name : Cache Go
289+ id : module-cache
271290 uses : actions/cache@v2
272291 env :
273292 cache-name : cache-go-modules
274293 with :
275- path : /home/runner/go/pkg/mod
276- key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
294+ path : |
295+ /home/runner/go/pkg/mod
296+ /home/runner/.cache/go-build
297+ key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.mod', '**/go.sum') }}
277298 - name : Cache Tools
278299 id : tool-cache
279300 uses : actions/cache@v2
@@ -365,13 +386,6 @@ jobs:
365386 echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
366387 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
367388 mkdir bin/
368- - name : Cache Go Modules
369- uses : actions/cache@v2
370- env :
371- cache-name : cache-go-modules
372- with :
373- path : \Users\runneradmin\go\pkg\mod
374- key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
375389 - name : Download Binaries
376390 uses : actions/download-artifact@v1
377391 with :
0 commit comments