Skip to content

Commit

Permalink
ci: add (re)open events for prs and handle 2+ apps (#2279)
Browse files Browse the repository at this point in the history
* ci: add (re)open events for prs and handle 2+ apps

for workflow dispatch

* ci: update var name in test suite job
  • Loading branch information
cwyl02 authored Jun 10, 2024
1 parent 3205744 commit fc1f475
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/application-test-scenario-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
12 changes: 6 additions & 6 deletions .github/workflows/application-test-scenario-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
22 changes: 11 additions & 11 deletions .github/workflows/application-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
default: 'main'
type: string
pull_request:
types: [synchronize, labeled]
types: [synchronize, labeled, opened, reopened]
push:
branches:
- main
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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

0 comments on commit fc1f475

Please sign in to comment.