From 7ba930c6b4de82d5f1fafabf27a74fbefac70f31 Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Thu, 7 Nov 2024 17:14:16 +0100 Subject: [PATCH] chore(ci): Set test parameters for scheduled runs --- .github/workflows/integration-test.yml | 27 +++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 5633532c..9a6ef2c0 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -3,6 +3,16 @@ name: Integration Test run-name: | Integration Test on ${{ inputs.test-platform }}-${{ inputs.test-architecture }} (${{ inputs.test-run == 'all' && 'all' || format('{0}={1}', inputs.test-run, inputs.test-parameter) }}) +env: + DEFAULT_TEST_PLATFORM: kind-1.31.0 + DEFAULT_TEST_ARCHITECTURE: amd64 + DEFAULT_TEST_RUN: all + DEFAULT_TEST_PARAMETER: "" # Unused when the test-run is 'all' + TEST_PLATFORM: ${{ inputs.test-platform }} + TEST_ARCHITECTURE: ${{ inputs.test-architecture }} + TEST_RUN: ${{ inputs.test-run }} + TEST_PARAMETER: ${{ inputs.test-parameter }} + on: schedule: # At 00:00 on Sunday. See: https://crontab.guru/#0_0_*_*_0 @@ -54,6 +64,17 @@ jobs: name: Run Integration Test runs-on: ubuntu-latest steps: + - name: Override integration test options for scheduled run + if: github.event_name == 'schedule' + shell: bash + run: | + set -euo pipefail + + echo "TEST_PLATFORM=$DEFAULT_TEST_PLATFORM" | tee -a "$GITHUB_ENV" + echo "TEST_ARCHITECTURE=$DEFAULT_TEST_ARCHITECTURE" | tee -a "$GITHUB_ENV" + echo "TEST_RUN=$DEFAULT_TEST_RUN" | tee -a "$GITHUB_ENV" + echo "TEST_PARAMETER=$DEFAULT_TEST_PARAMETER" | tee -a "$GITHUB_ENV" + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: submodules: recursive @@ -62,9 +83,9 @@ jobs: id: test uses: stackabletech/actions/run-integration-test@5b66858af3597c4ea34f9b33664b8034a1d28427 # v0.3.0 with: - test-platform: ${{ inputs.test-platform }}-${{ inputs.test-architecture }} - test-run: ${{ inputs.test-run }} - test-parameter: ${{ inputs.test-parameter }} + test-platform: ${{ env.TEST_PLATFORM }}-${{ env.TEST_ARCHITECTURE }} + test-run: ${{ env.TEST_RUN }} + test-parameter: ${{ env.TEST_PARAMETER }} replicated-api-token: ${{ secrets.REPLICATED_API_TOKEN }} - name: Send Notification