From 172c72be09707580c1de61fff126185bff472356 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Wed, 30 Apr 2025 16:43:22 +0200 Subject: [PATCH] ci: Ensure helm tests run on changes to the chart Signed-off-by: Marco Franssen --- .github/workflows/helm-ci.yaml | 56 ++++++++++++++++++++++++++++++++++ .github/workflows/main.yaml | 34 --------------------- 2 files changed, 56 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/helm-ci.yaml diff --git a/.github/workflows/helm-ci.yaml b/.github/workflows/helm-ci.yaml new file mode 100644 index 000000000..837bae969 --- /dev/null +++ b/.github/workflows/helm-ci.yaml @@ -0,0 +1,56 @@ +name: Helm CI + +on: + pull_request: + branches: + - 'master' + - 'release-*' + paths: + - ".github/workflows/helm-ci.yaml" + - "charts/**" + - "tests/**" + - "Makefile" + - "go.mod" + - "go.sum" + +env: + KUBECTL_VERSION: v1.25.1 + HELM_VERSION: v3.17.2 + +jobs: + helm-tests: + name: helm e2e tests + runs-on: ubuntu-22.04 + + timeout-minutes: 30 + + env: + GO111MODULE: "on" + + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 + + - name: Install Go + uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 + with: + go-version-file: go.mod + cache-dependency-path: go.sum + + - name: Setup kubectl + uses: marcofranssen/setup-kubectl@d81bf181729cee2bc813ac2ea2f74dec90f01f99 # v1.3.0 + with: + kubectlVersion: ${{ env.KUBECTL_VERSION }} + + - name: Install Helm + uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 + with: + version: ${{ env.HELM_VERSION }} + + - name: Install dependences + run: make ginkgo kind + + - name: Run helm e2e tests + run: make helm-e2e diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9f9697ce4..4d6a4fcfd 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -116,40 +116,6 @@ jobs: - name: Run e2e tests run: make e2e - helm_tests: - runs-on: ubuntu-22.04 - timeout-minutes: 30 - name: helm e2e tests - env: - GO111MODULE: "on" - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 0 - - - name: Install Go - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 - with: - go-version-file: go.mod - cache-dependency-path: go.sum - - - name: Setup kubectl - uses: marcofranssen/setup-kubectl@d81bf181729cee2bc813ac2ea2f74dec90f01f99 # v1.3.0 - with: - kubectlVersion: ${{ env.KUBECTL_VERSION }} - - - name: Install Helm - uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 - with: - version: ${{ env.HELM_VERSION }} - - - name: Install dependences - run: make ginkgo kind - - - name: Run helm e2e tests - run: make helm-e2e - build: runs-on: ubuntu-22.04 timeout-minutes: 30