From 5a18230e358a5720f02282ec1520f898573e6b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Fri, 20 Jan 2023 08:40:44 +0100 Subject: [PATCH] chore: run helm test (#6053) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché Signed-off-by: Charles-Edouard Brétéché --- .github/actions/setup-test-env/action.yaml | 2 +- .github/workflows/helm-test.yaml | 9 +++++++++ Makefile | 15 ++++++++++++--- 3 files changed, 22 insertions(+), 4 deletions(-) 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