|  | 
|  | 1 | +--- | 
|  | 2 | +name: Integration Test | 
|  | 3 | +run-name: | | 
|  | 4 | +  Integration Test on ${{ inputs.test-platform }}-${{ inputs.test-architecture }} (${{ inputs.test-run == 'all' && 'all' || format('{0}={1}', inputs.test-run, inputs.test-parameter) }}) | 
|  | 5 | +
 | 
|  | 6 | +env: | 
|  | 7 | +  DEFAULT_TEST_PLATFORM: kind-1.31.0 | 
|  | 8 | +  DEFAULT_TEST_ARCHITECTURE: amd64 | 
|  | 9 | +  DEFAULT_TEST_RUN: all | 
|  | 10 | +  DEFAULT_TEST_PARAMETER: "" # Unused when the test-run is 'all' | 
|  | 11 | +  TEST_PLATFORM: ${{ inputs.test-platform }} | 
|  | 12 | +  TEST_ARCHITECTURE: ${{ inputs.test-architecture }} | 
|  | 13 | +  TEST_RUN: ${{ inputs.test-run }} | 
|  | 14 | +  TEST_PARAMETER: ${{ inputs.test-parameter }} | 
|  | 15 | + | 
|  | 16 | +on: | 
|  | 17 | +  schedule: | 
|  | 18 | +    # At 00:00 on Sunday. See: https://crontab.guru/#0_0_*_*_0 | 
|  | 19 | +    - cron: "0 0 * * 0" | 
|  | 20 | +  workflow_dispatch: | 
|  | 21 | +    inputs: | 
|  | 22 | +      test-platform: | 
|  | 23 | +        description: | | 
|  | 24 | +          The test platform to run on (kind doesn't support `arm64`) | 
|  | 25 | +        required: true | 
|  | 26 | +        type: choice | 
|  | 27 | +        options: | 
|  | 28 | +          - kind-1.31.0 | 
|  | 29 | +          - kind-1.30.3 | 
|  | 30 | +          - aks-1.29 | 
|  | 31 | +          - aks-1.28 | 
|  | 32 | +          - aks-1.27 | 
|  | 33 | +          - eks-1.29 | 
|  | 34 | +          - eks-1.28 | 
|  | 35 | +          - eks-1.27 | 
|  | 36 | +          - gke-1.29 | 
|  | 37 | +          - gke-1.28 | 
|  | 38 | +          - gke-1.27 | 
|  | 39 | +          - okd-4.15 | 
|  | 40 | +          - okd-4.14 | 
|  | 41 | +          - okd-4.13 | 
|  | 42 | +      test-architecture: | 
|  | 43 | +        description: | | 
|  | 44 | +          The architecture the tests will run on | 
|  | 45 | +        required: true | 
|  | 46 | +        type: choice | 
|  | 47 | +        options: | 
|  | 48 | +          - amd64 | 
|  | 49 | +          - arm64 | 
|  | 50 | +      test-run: | 
|  | 51 | +        description: Type of test run | 
|  | 52 | +        required: true | 
|  | 53 | +        type: choice | 
|  | 54 | +        options: | 
|  | 55 | +          - all | 
|  | 56 | +          - test-suite | 
|  | 57 | +          - test | 
|  | 58 | +      test-parameter: | 
|  | 59 | +        description: Parameter to `--test-suite` or `--test` (ignored for `all`) | 
|  | 60 | +        default: smoke | 
|  | 61 | + | 
|  | 62 | +jobs: | 
|  | 63 | +  test: | 
|  | 64 | +    name: Run Integration Test | 
|  | 65 | +    runs-on: ubuntu-latest | 
|  | 66 | +    steps: | 
|  | 67 | +      - name: Override integration test options for scheduled run | 
|  | 68 | +        if: github.event_name == 'schedule' | 
|  | 69 | +        shell: bash | 
|  | 70 | +        run: | | 
|  | 71 | +          set -euo pipefail | 
|  | 72 | +
 | 
|  | 73 | +          echo "TEST_PLATFORM=$DEFAULT_TEST_PLATFORM" | tee -a "$GITHUB_ENV" | 
|  | 74 | +          echo "TEST_ARCHITECTURE=$DEFAULT_TEST_ARCHITECTURE" | tee -a "$GITHUB_ENV" | 
|  | 75 | +          echo "TEST_RUN=$DEFAULT_TEST_RUN" | tee -a "$GITHUB_ENV" | 
|  | 76 | +          echo "TEST_PARAMETER=$DEFAULT_TEST_PARAMETER" | tee -a "$GITHUB_ENV" | 
|  | 77 | +
 | 
|  | 78 | +      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | 
|  | 79 | +        with: | 
|  | 80 | +          submodules: recursive | 
|  | 81 | + | 
|  | 82 | +      - name: Run Integration Test | 
|  | 83 | +        id: test | 
|  | 84 | +        uses: stackabletech/actions/run-integration-test@5b66858af3597c4ea34f9b33664b8034a1d28427 # v0.3.0 | 
|  | 85 | +        with: | 
|  | 86 | +          test-platform: ${{ env.TEST_PLATFORM }}-${{ env.TEST_ARCHITECTURE }} | 
|  | 87 | +          test-run: ${{ env.TEST_RUN }} | 
|  | 88 | +          test-parameter: ${{ env.TEST_PARAMETER }} | 
|  | 89 | +          replicated-api-token: ${{ secrets.REPLICATED_API_TOKEN }} | 
|  | 90 | + | 
|  | 91 | +      - name: Send Notification | 
|  | 92 | +        if: ${{ failure() }} | 
|  | 93 | +        env: | 
|  | 94 | +          SLACK_BOT_TOKEN: ${{ secrets.SLACK_INTEGRATION_TEST_TOKEN }} | 
|  | 95 | +        uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 | 
|  | 96 | +        with: | 
|  | 97 | +          channel-id: "C07UYJYSMSN" # notifications-integration-tests | 
|  | 98 | +          payload: | | 
|  | 99 | +              { | 
|  | 100 | +                "text": "Integration Test *${{ github.repository }}* failed", | 
|  | 101 | +                "attachments": [ | 
|  | 102 | +                  { | 
|  | 103 | +                    "pretext": "Started at ${{ steps.test.outputs.start-time }}, failed at ${{ steps.test.outputs.end-time }}", | 
|  | 104 | +                    "color": "#aa0000", | 
|  | 105 | +                    "actions": [ | 
|  | 106 | +                      { | 
|  | 107 | +                        "type": "button", | 
|  | 108 | +                        "text": "Go to integration test run", | 
|  | 109 | +                        "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | 
|  | 110 | +                      } | 
|  | 111 | +                    ] | 
|  | 112 | +                  } | 
|  | 113 | +                ] | 
|  | 114 | +              } | 
0 commit comments