From 8c7f669c0244a6225ab0fdff61229bd4d02875b4 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Mon, 23 Sep 2024 19:21:52 -0700 Subject: [PATCH] ci(test): add matrix for upgrade paths --- .github/workflows/chart-test.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chart-test.yml b/.github/workflows/chart-test.yml index 977e8211..730559ea 100644 --- a/.github/workflows/chart-test.yml +++ b/.github/workflows/chart-test.yml @@ -24,6 +24,8 @@ on: - v[0-9]+ - v[0-9]+.[0-9]+ - cryostat-v[0-9]+.[0-9]+ + # TODO: Remove before merging https://github.com/cryostatio/cryostat-helm/pull/192 + - separate-db-storage jobs: helm-test: @@ -31,6 +33,12 @@ jobs: env: TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }} TEST_NAMESPACE: helm-test + strategy: + matrix: + # Supported strategies + upgrade-strategy: + - reset-values + - reset-then-reuse-values steps: - name: Fail if safe-to-test label NOT applied if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }} @@ -57,7 +65,7 @@ jobs: HELM_LOCATION="$(which helm)" sudo mv $HELM_LOCATION "$(dirname $HELM_LOCATION)/.helm" - cat <(echo '#!/usr/bin/env bash') <(echo 'exec .helm "${@//--reuse-values/--reset-then-reuse-values}"') | sudo tee $HELM_LOCATION + cat <(echo '#!/usr/bin/env bash') <(echo 'exec .helm "${@//--reuse-values/--${{ matrix.upgrade-strategy }}}"') | sudo tee $HELM_LOCATION sudo chmod +x $HELM_LOCATION bash ct.bash --upgrade