Skip to content

Commit

Permalink
ci: install controller tools
Browse files Browse the repository at this point in the history
TODO: maybe instead cache / save them in the image...
  • Loading branch information
tommyknows committed Feb 24, 2023
1 parent 3e778ad commit 6d18896
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ commands:
- go-build-cache-{{ .Branch }}-{{ .Revision }}
- go-build-cache-{{ .Branch }}-
- go-build-cache-

jobs:
scan:
resource_class: small
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 6d18896

Please sign in to comment.