-
Notifications
You must be signed in to change notification settings - Fork 4
119 lines (112 loc) · 3.92 KB
/
integration-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
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
# - cron: "0 0 * * 0"
workflow_dispatch:
inputs:
test-platform:
description: |
The test platform to run on
required: true
type: choice
options:
- kind-1.31.2
- kind-1.30.6
- rke2-1.31.2
- rke2-1.30.6
- k3s-1.31.2
- k3s-1.30.6
- aks-1.29
- aks-1.28
- aks-1.27
- eks-1.29
- eks-1.28
- eks-1.27
- gke-1.29
- gke-1.28
- gke-1.27
- okd-4.15
- okd-4.14
- okd-4.13
test-architecture:
description: |
The architecture the tests will run on. Consult the run-integration-test action README for
more details on supported architectures for each distribution
required: true
type: choice
options:
- amd64
- arm64
test-run:
description: Type of test run
required: true
type: choice
options:
- all
- test-suite
- test
test-parameter:
description: Parameter to `--test-suite` or `--test` (ignored for `all`)
default: smoke
jobs:
test:
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
- name: Run Integration Test
id: test
uses: stackabletech/actions/run-integration-test@95626907fd8cae2f17c862ae40bcab1aa5a2c854 # v0.5.0
with:
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
if: ${{ failure() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_INTEGRATION_TEST_TOKEN }}
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: "C07UYJYSMSN" # notifications-integration-tests
payload: |
{
"text": "Integration Test *${{ github.repository }}* failed",
"attachments": [
{
"pretext": "Started at ${{ steps.test.outputs.start-time }}, failed at ${{ steps.test.outputs.end-time }}",
"color": "#aa0000",
"actions": [
{
"type": "button",
"text": "Go to integration test run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}