diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a5af07..77d6e6e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,7 +29,6 @@ commands: - go-build-cache-{{ .Branch }}-{{ .Revision }} - go-build-cache-{{ .Branch }}- - go-build-cache- - jobs: scan: resource_class: small @@ -62,7 +61,11 @@ jobs: # we're not using the go/test command from the Go orb because that uses `-count=1` as an argument. # That means all tests are run every time, instead of honoring the cache. - run: - command: go test -race ./... + command: | + # install required tools for kubebuilder tests. + go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest + source <(setup-envtest use -p env) + go test -race ./... - save-build-cache release: diff --git a/README.md b/README.md index 6afe3ae..11da808 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ - Install Kubebuilder from your package manager of choice - Install setup-envtest with Go: `go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest` - Install the required tools: `setup-envtest use` -- Setup the environment: `setup-envtest use -p | source` +- Setup the environment: `setup-envtest use -p env | source` (yes this is not optimal)