|
1 | | -name: E2E Tests |
| 1 | +name: E2E Tests (Manual) |
2 | 2 |
|
3 | 3 | permissions: |
4 | 4 | contents: read |
5 | 5 |
|
6 | 6 | on: |
7 | 7 | workflow_dispatch: |
8 | | - |
9 | | - # TODO: Re-enable automatic triggers once e2e tests are working |
10 | | - # push: |
11 | | - # branches: [main] |
| 8 | + inputs: |
| 9 | + test_target: |
| 10 | + description: 'Make target to run' |
| 11 | + required: true |
| 12 | + default: 'test-e2e-lifecycle' |
| 13 | + type: choice |
| 14 | + options: |
| 15 | + - test-e2e-lifecycle |
| 16 | + - test-e2e |
| 17 | + - test-e2e-ha |
| 18 | + - test-e2e-upgrade |
| 19 | + - test-e2e-self-hosted |
| 20 | + - test-e2e-kcp-remediation |
| 21 | + - test-e2e-conformance |
| 22 | + - test-e2e-conformance-fast |
12 | 23 |
|
13 | 24 | concurrency: |
14 | | - group: e2e-tests-${{ github.ref }} |
15 | | - cancel-in-progress: true |
| 25 | + group: e2e-tests |
| 26 | + cancel-in-progress: false |
16 | 27 |
|
17 | 28 | jobs: |
18 | 29 | test-e2e: |
19 | | - name: Run on Ubuntu |
| 30 | + name: ${{ github.event.inputs.test_target }} |
20 | 31 | runs-on: ubuntu-latest |
| 32 | + environment: e2e |
21 | 33 | steps: |
22 | | - - name: Clone the code |
| 34 | + - name: Checkout |
23 | 35 | uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 |
24 | 36 | with: |
25 | 37 | fetch-depth: 0 |
26 | 38 | persist-credentials: false |
27 | 39 |
|
28 | | - - name: Setup Go |
29 | | - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 |
30 | | - with: |
31 | | - go-version-file: go.mod |
32 | | - |
33 | | - - name: Install the latest version of kind |
34 | | - run: | |
35 | | - curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-$(go env GOARCH) |
36 | | - chmod +x ./kind |
37 | | - sudo mv ./kind /usr/local/bin/kind |
| 40 | + - name: Setup e2e environment |
| 41 | + uses: ./.github/actions/e2e-setup |
38 | 42 |
|
39 | | - - name: Verify kind installation |
40 | | - run: kind version |
| 43 | + - name: Run e2e tests |
| 44 | + env: |
| 45 | + CLOUDSCALE_API_TOKEN: ${{ secrets.CLOUDSCALE_API_TOKEN }} |
| 46 | + TAG: manual-${{ github.sha }} |
| 47 | + TEST_TARGET: ${{ github.event.inputs.test_target }} |
| 48 | + run: make $TEST_TARGET |
41 | 49 |
|
42 | | - - name: Running Test e2e |
43 | | - run: | |
44 | | - go mod tidy |
45 | | - make test-e2e |
| 50 | + - name: Upload test artifacts |
| 51 | + if: always() |
| 52 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
| 53 | + with: |
| 54 | + name: e2e-artifacts-manual-${{ github.run_id }} |
| 55 | + path: _artifacts/ |
| 56 | + retention-days: 14 |
0 commit comments