Skip to content

Application Specific Test - Upgrade #1

Application Specific Test - Upgrade

Application Specific Test - Upgrade #1

name: Application Specific Test Scenario
on:
workflow_dispatch:
inputs:
app:
description: 'The kommander application to test, e.g. reloader,kube-prometheus-stack'
required: true
type: string
from_version_ref:
description: 'The NKP version(git branch or tag) version to upgrade from. e.g., v2.7.0-dev'
required: true
type: string
to_version_ref:
description: 'The NKP version(git branch or tag) to run upgrade to. Using latest version by default e.g., v2.8.0-dev'
required: true
type: string
workflow_call:
inputs:
app:
description: 'The kommander application to test, e.g. reloader,kube-prometheus-stack'
required: true
type: string
from_version_ref:
description: 'The NKP version(git branch or tag) version to upgrade from. e.g., v2.7.0-dev'
required: true
type: string
to_version_ref:
description: 'The NKP version(git branch or tag) to run upgrade to. Using latest version by default e.g., v2.8.0-dev'
required: true
type: string
env:
UPGRADE_KAPPS_REPO_PATH: '.work/upgrade/kommander-applications'
jobs:
run-test-scenario:
runs-on:
- ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.to_version_ref }}
- name: Checkout previous version of k-apps
uses: actions/checkout@v4
with:
path: apptests/${{env.UPGRADE_KAPPS_REPO_PATH}}
ref: ${{ inputs.from_version_ref }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'apptests/go.mod'
- name: Install Ginkgo
working-directory: apptests
run: go install github.com/onsi/ginkgo/v2/ginkgo
- name: Run ${{ inputs.app }} upgrade Test
working-directory: apptests
run: |
ginkgo --label-filter="upgrade && ${{ inputs.app }}" appscenarios