File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,13 +17,13 @@ jobs:
1717 with :
1818 go-version-file : go.mod
1919
20- - name : Download setup-envtest
21- run : |
22- go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
23- setup-envtest use --bin-dir ./bin/k8s -p path
20+ - name : Install setup-envtest
21+ run : go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
2422
2523 - name : Running Tests
2624 run : |
2725 go mod tidy
28- KUBEBUILDER_ASSETS="$(setup-envtest use --bin-dir ./bin/k8s -p path)" \
29- go test $(go list ./... | grep -v /e2e) -coverprofile cover.out
26+ K8S_VERSION=$(go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $3}')
27+ KUBEBUILDER_ASSETS="$($(go env GOPATH)/bin/setup-envtest use ${K8S_VERSION} --bin-dir $(pwd)/bin/k8s -p path)"
28+ export KUBEBUILDER_ASSETS
29+ go test $(go list ./... | grep -v /e2e) -coverprofile cover.out
You can’t perform that action at this time.
0 commit comments