2323 - name : Check out code into the Go module directory
2424 uses : actions/checkout@v2
2525
26+ - name : Restore go mod cache
27+ uses : actions/cache@v2
28+ with :
29+ path : |
30+ ~/.cache/go-build
31+ ~/go/pkg/mod
32+ ~/go/bin/
33+ key : gocache
34+
2635 - name : Unit Tests
2736 run : make unit-test
2837
5261
5362 - name : Check out code into the Go module directory
5463 uses : actions/checkout@v2
64+
65+ - name : Restore go mod cache
66+ uses : actions/cache@v2
67+ with :
68+ path : |
69+ ~/.cache/go-build
70+ ~/go/pkg/mod
71+ ~/go/bin/
72+ key : gocache
73+
5574 - name : Build Linux Binaries
5675 run : make build-binaries
5776
6584 with :
6685 go-version : ${{ env.DEFAULT_GO_VERSION }}
6786
87+ - name : Restore go mod cache
88+ uses : actions/cache@v2
89+ with :
90+ path : |
91+ ~/.cache/go-build
92+ ~/go/pkg/mod
93+ ~/go/bin/
94+ key : gocache
95+
6896 - name : Check out code into the Go module directory
6997 uses : actions/checkout@v2
7098
@@ -84,6 +112,15 @@ jobs:
84112 - name : Check out code into the Go module directory
85113 uses : actions/checkout@v2
86114
115+ - name : Restore go mod cache
116+ uses : actions/cache@v2
117+ with :
118+ path : |
119+ ~/.cache/go-build
120+ ~/go/pkg/mod
121+ ~/go/bin/
122+ key : gocache
123+
87124 - name : Build Windows Binaries
88125 run : choco install make && choco install zip && RefreshEnv.cmd && make build-binaries-windows
89126
@@ -100,6 +137,15 @@ jobs:
100137 - name : Check out code into the Go module directory
101138 uses : actions/checkout@v2
102139
140+ - name : Restore go mod cache
141+ uses : actions/cache@v2
142+ with :
143+ path : |
144+ ~/.cache/go-build
145+ ~/go/pkg/mod
146+ ~/go/bin/
147+ key : gocache
148+
103149 - name : Build Windows Docker Images
104150 run : choco install make && RefreshEnv.cmd && make build-docker-images-windows
105151
@@ -119,6 +165,15 @@ jobs:
119165 - name : Check out code into the Go module directory
120166 uses : actions/checkout@v2
121167
168+ - name : Restore go mod cache
169+ uses : actions/cache@v2
170+ with :
171+ path : |
172+ ~/.cache/go-build
173+ ~/go/pkg/mod
174+ ~/go/bin/
175+ key : gocache
176+
122177 - name : E2E Tests
123178 run : test/k8s-local-cluster-test/run-test -v ${{ matrix.k8sVersion }}
124179
0 commit comments