From c090bcdec08fd7b977de6ffb0564b5d4f57b7785 Mon Sep 17 00:00:00 2001 From: York Chen Date: Mon, 3 Jun 2024 12:39:26 -0400 Subject: [PATCH 1/2] ci: add (re)open events for prs and handle 2+ apps for workflow dispatch --- .../workflows/application-test-scenario-install.yaml | 12 ++++++------ .../workflows/application-test-scenario-upgrade.yaml | 12 ++++++------ .github/workflows/application-test.yaml | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/application-test-scenario-install.yaml b/.github/workflows/application-test-scenario-install.yaml index df1c001c3..816bcc177 100644 --- a/.github/workflows/application-test-scenario-install.yaml +++ b/.github/workflows/application-test-scenario-install.yaml @@ -2,8 +2,8 @@ name: Application Specific Test - Install on: workflow_dispatch: inputs: - app: - description: 'The kommander application to test, e.g. reloader,kube-prometheus-stack' + apps: + description: 'The ginkgo label filter query of kommander applications to test, e.g. reloader, or reloader || cert-manager' required: true type: string version_ref: @@ -12,8 +12,8 @@ on: type: string workflow_call: inputs: - app: - description: 'The kommander application to test, e.g. reloader,kube-prometheus-stack' + apps: + description: 'The ginkgo label filter query of kommander applications to test, e.g. reloader, or reloader || cert-manager' required: true type: string version_ref: @@ -41,7 +41,7 @@ jobs: working-directory: apptests run: go install github.com/onsi/ginkgo/v2/ginkgo - - name: Run ${{ github.event.inputs.app }} install Test + - name: Run install Test working-directory: apptests run: | - ginkgo --label-filter="install && ${{ inputs.app }}" appscenarios + ginkgo --v --label-filter="install && (${{ inputs.apps }})" appscenarios diff --git a/.github/workflows/application-test-scenario-upgrade.yaml b/.github/workflows/application-test-scenario-upgrade.yaml index 541d50d73..e4240e6fb 100644 --- a/.github/workflows/application-test-scenario-upgrade.yaml +++ b/.github/workflows/application-test-scenario-upgrade.yaml @@ -2,8 +2,8 @@ name: Application Specific Test - Upgrade on: workflow_dispatch: inputs: - app: - description: 'The kommander application to test, e.g. reloader,kube-prometheus-stack' + apps: + description: 'The ginkgo label filter query of kommander applications to test, e.g. reloader, or reloader || cert-manager' required: true type: string from_version_ref: @@ -16,8 +16,8 @@ on: type: string workflow_call: inputs: - app: - description: 'The kommander application to test, e.g. reloader,kube-prometheus-stack' + apps: + description: 'The ginkgo label filter query of kommander applications to test, e.g. reloader, or reloader || cert-manager' required: true type: string from_version_ref: @@ -58,7 +58,7 @@ jobs: working-directory: apptests run: go install github.com/onsi/ginkgo/v2/ginkgo - - name: Run ${{ inputs.app }} upgrade Test + - name: Run upgrade Test working-directory: apptests run: | - ginkgo --label-filter="upgrade && ${{ inputs.app }}" appscenarios + ginkgo --v --label-filter="upgrade && (${{ inputs.apps }})" appscenarios diff --git a/.github/workflows/application-test.yaml b/.github/workflows/application-test.yaml index fa7cfab74..b9c6044a9 100644 --- a/.github/workflows/application-test.yaml +++ b/.github/workflows/application-test.yaml @@ -12,7 +12,7 @@ on: default: 'main' type: string pull_request: - types: [synchronize, labeled] + types: [synchronize, labeled, opened, reopened] push: branches: - main From 4b846c89ce50a75a5f038e155f48364f028e3974 Mon Sep 17 00:00:00 2001 From: York Chen Date: Mon, 3 Jun 2024 12:43:42 -0400 Subject: [PATCH 2/2] ci: update var name in test suite job --- .github/workflows/application-test.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/application-test.yaml b/.github/workflows/application-test.yaml index b9c6044a9..074b0b8a3 100644 --- a/.github/workflows/application-test.yaml +++ b/.github/workflows/application-test.yaml @@ -141,10 +141,10 @@ jobs: strategy: fail-fast: false matrix: - app: ${{ fromJson(needs.setup-pr.outputs.apps) }} + apps: ${{ fromJson(needs.setup-pr.outputs.apps) }} with: version_ref: ${{ github.head_ref }} - app: ${{ matrix.app }} + apps: ${{ matrix.apps }} secrets: inherit trigger-tests-all-apps-install-ondemand: @@ -154,10 +154,10 @@ jobs: strategy: fail-fast: false matrix: - app: ${{ fromJson(needs.setup-all-apps.outputs.apps) }} + apps: ${{ fromJson(needs.setup-all-apps.outputs.apps) }} with: version_ref: ${{ github.event.inputs.version_ref }} - app: ${{ matrix.app }} + apps: ${{ matrix.apps }} trigger-tests-all-apps-install-push: needs: setup-all-apps @@ -166,10 +166,10 @@ jobs: strategy: fail-fast: false matrix: - app: ${{ fromJson(needs.setup-all-apps.outputs.apps) }} + apps: ${{ fromJson(needs.setup-all-apps.outputs.apps) }} with: version_ref: "main" - app: ${{ matrix.app }} + apps: ${{ matrix.apps }} trigger-upgrade-tests-pr: needs: @@ -180,9 +180,9 @@ jobs: fail-fast: false matrix: from: ${{ fromJson(needs.generate-upgrade-versions.outputs.from_versions) }} - app: ${{ fromJson(needs.setup-pr.outputs.apps) }} + apps: ${{ fromJson(needs.setup-pr.outputs.apps) }} with: - app: ${{ matrix.app }} + apps: ${{ matrix.apps }} from_version_ref: ${{ matrix.from }} to_version_ref: ${{ needs.generate-upgrade-versions.outputs.to_version }} secrets: inherit @@ -197,9 +197,9 @@ jobs: fail-fast: false matrix: from: ${{ fromJson(needs.generate-upgrade-versions.outputs.from_versions) }} - app: ${{ fromJson(needs.setup-all-apps.outputs.apps) }} + apps: ${{ fromJson(needs.setup-all-apps.outputs.apps) }} with: - app: ${{ matrix.app }} + apps: ${{ matrix.apps }} from_version_ref: ${{ matrix.from }} to_version_ref: ${{ needs.generate-upgrade-versions.outputs.to_version }} secrets: inherit