Skip to content

Commit 471ad5e

Browse files
author
Per Goncalves da Silva
committed
Add test-operator unit tests to CI
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent 2396e27 commit 471ad5e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/unit-test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
run: |
2424
make test-unit
2525
26+
- name: Run test-operator unit tests
27+
run: |
28+
make test-test-operator
29+
2630
- uses: codecov/[email protected]
2731
with:
2832
disable_search: true

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,12 @@ test-unit: $(SETUP_ENVTEST) envtest-k8s-bins #HELP Run the unit tests
246246
$(UNIT_TEST_DIRS) \
247247
-test.gocoverdir=$(COVERAGE_UNIT_DIR)
248248

249+
250+
.PHONE: test-test-operator
251+
test-test-operator:
252+
KUBEBUILDER_ASSETS="$(shell $(SETUP_ENVTEST) use -p path $(ENVTEST_VERSION) $(SETUP_ENVTEST_BIN_DIR_OVERRIDE))" \
253+
CGO_ENABLED=1 go test -tags '$(GO_BUILD_TAGS)' -count=1 -race -short ./testdata/images/bundles/test-operator/...
254+
249255
TEST_OPERATOR_CONTROLLERS_HOME=./testdata/images/controllers
250256
TEST_OPERATOR_CONTROLLERS=v1.0.0 v2.0.0
251257

0 commit comments

Comments
 (0)