File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,22 @@ jobs:
18
18
version : v1.32.2
19
19
args : --timeout=5m
20
20
21
- - name : Change Owner
22
- shell : bash
23
- run : sudo chown -R $(id -u):$(id -g) /usr/local
21
+ - name : Check etcd Cache
22
+ id : check-etcd-cache
23
+ uses : actions/cache@v2
24
+ with :
25
+ path : ~/go/bin/etcd
26
+ key : etcd
24
27
25
- - name : Check Kubebuilder Cache
26
- id : check-kubebuilder -cache
28
+ - name : Check kube-apiserver Cache
29
+ id : check-kube-apiserver -cache
27
30
uses : actions/cache@v2
28
31
with :
29
- path : /usr/local/kubebuilder/ bin
30
- key : kubebuilder
32
+ path : ~/go/ bin/kube-apiserver
33
+ key : kube-apiserver
31
34
32
35
- name : Install Kubebuilder
33
- if : steps.check-kubebuilder -cache.outputs.cache-hit != 'true'
36
+ if : ${{ steps.check-etcd -cache.outputs.cache-hit != 'true' || steps.check-kube-apiserver-cache.outputs.cache-hit != 'true' }}
34
37
run : make kubebuilder
35
38
36
39
- name : Run tests
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ all: manager
28
28
29
29
# Run tests
30
30
test : generate fmt vet manifests
31
- go test ./... -coverprofile cover.out -v
31
+ KUBEBUILDER_ASSETS= ${GOBIN} go test ./... -coverprofile cover.out -v
32
32
33
33
# todo: Modify Dockerfile to include the version magic
34
34
# Build manager binary
@@ -189,6 +189,5 @@ kubebuilder:
189
189
os=$$(go env GOOS ) ; \
190
190
arch=$$(go env GOARCH ) ; \
191
191
curl -L https://go.kubebuilder.io/dl/2.3.1/$$ {os}/$$ {arch} | tar -xz -C /tmp/ ; \
192
- sudo mv /tmp/kubebuilder_2.3.1_$$ {os}_$$ {arch} /usr/local/kubebuilder ; \
193
- export PATH=$PATH :/usr/local/kubebuilder/bin ; \
192
+ mv /tmp/kubebuilder_2.3.1_$$ {os}_$$ {arch}/bin/* ${GOBIN} ; \
194
193
}
You can’t perform that action at this time.
0 commit comments