Skip to content

Commit e89ddb1

Browse files
committed
ci: install controller tools
TODO: maybe instead cache / save them in the image...
1 parent 23e9815 commit e89ddb1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.circleci/config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ commands:
2929
- go-build-cache-{{ .Branch }}-{{ .Revision }}
3030
- go-build-cache-{{ .Branch }}-
3131
- go-build-cache-
32-
3332
jobs:
3433
scan:
3534
resource_class: small
@@ -62,7 +61,11 @@ jobs:
6261
# we're not using the go/test command from the Go orb because that uses `-count=1` as an argument.
6362
# That means all tests are run every time, instead of honoring the cache.
6463
- run:
65-
command: go test -race ./...
64+
command: |
65+
# install required tools for kubebuilder tests.
66+
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
67+
source <(setup-envtest use -p env)
68+
go test -race ./...
6669
- save-build-cache
6770

6871
release:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- Install Kubebuilder from your package manager of choice
66
- Install setup-envtest with Go: `go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest`
77
- Install the required tools: `setup-envtest use`
8-
- Setup the environment: `setup-envtest use -p | source`
8+
- Setup the environment: `setup-envtest use -p env | source`
99

1010
(yes this is not optimal)
1111

0 commit comments

Comments
 (0)