diff --git a/.github/actions/setup-test-env/action.yaml b/.github/actions/setup-test-env/action.yaml index df2404785d..1eab7991a1 100644 --- a/.github/actions/setup-test-env/action.yaml +++ b/.github/actions/setup-test-env/action.yaml @@ -5,7 +5,7 @@ description: Create kind cluster, deploy kyverno, and wait pods are ready. inputs: version: description: kubernetes version - required: true + default: v1.26.0 runs: using: composite diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index b895c96871..9fe4307aad 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -33,3 +33,12 @@ jobs: then ct lint --target-branch=main --check-version-increment=false fi + - name: Setup test env + uses: ./.github/actions/setup-test-env + with: + build-cache-key: helm-tests + - name: Helm test + run: make helm-test + - name: Debug failure + if: failure() + uses: ./.github/actions/kyverno-logs diff --git a/Makefile b/Makefile index 493859f339..5fce4f15d6 100644 --- a/Makefile +++ b/Makefile @@ -658,9 +658,18 @@ test-cli-test-case-selector-flag: $(CLI_BIN) test-cli-registry: $(CLI_BIN) @$(CLI_BIN) test ./test/cli/registry --registry -################################## -# Testing & Code-Coverage -################################## +############# +# HELM TEST # +############# + +.PHONY: helm-test +helm-test: $(HELM) ## Run helm test + @echo Running helm test... >&2 + @$(HELM) test --namespace kyverno kyverno + +########################### +# Testing & Code-Coverage # +########################### helm-test-values: sed -i -e "s|nameOverride:.*|nameOverride: kyverno|g" charts/kyverno/values.yaml