Skip to content

Commit ae65a87

Browse files
authored
use github actions cache (#567)
1 parent d7d38c4 commit ae65a87

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ jobs:
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

@@ -52,6 +61,16 @@ jobs:
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

@@ -65,6 +84,15 @@ jobs:
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

Comments
 (0)