-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (78 loc) · 2.73 KB
/
manual-trigger.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
name: e2e-manual-trigger-tests
on:
workflow_dispatch:
inputs:
instance1:
description: "Please enter a valid BRB instance URL to run the tests on"
default: "https://main.brb.dbildungscloud.dev"
required: true
instance2:
description: "Please enter a valid NBC instance URL to run the tests on"
default: "https://main.nbc.dbildungscloud.dev"
required: true
instance3:
description: "Please enter a valid DBC instance URL to run the tests on"
default: "https://main.dbc.dbildungscloud.dev"
required: true
jobs:
e2e-system-tests:
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.set_variables.outputs.environment }}
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Checkout
uses: actions/checkout@v4
- name: Set all parameters for next job
id: set_variables
shell: bash
run: |
if [[ ! ${{ inputs.instance1 }} =~ (staging|schulportal) && ! ${{ inputs.instance2 }} =~ (staging|schulportal) && ! ${{ inputs.instance3 }} =~ (staging|schulportal) ]]; then
echo "environment=dev" >> $GITHUB_OUTPUT
else
echo "environment=ref" >> $GITHUB_OUTPUT
fi
run-tests-groupA:
needs: e2e-system-tests
uses: ./.github/workflows/main.yml
secrets:
service-account-token: ${{ secrets.CYPRESS_ONEPWD_SERVICE_ACCOUNT_TOKEN }}
with:
cypress_brb: ${{ inputs.instance1 }}
cypress_dbc: ${{ inputs.instance3 }}
cypress_nbc: ${{ inputs.instance2 }}
tag: cy:headless:stable:groupA:school_api_test:ci
environment: ${{ needs.e2e-system-tests.outputs.environment }}
groups: group-A
run-tests-groupB:
needs: e2e-system-tests
uses: ./.github/workflows/main.yml
secrets:
service-account-token: ${{ secrets.CYPRESS_ONEPWD_SERVICE_ACCOUNT_TOKEN }}
with:
cypress_brb: ${{ inputs.instance1 }}
cypress_dbc: ${{ inputs.instance3 }}
cypress_nbc: ${{ inputs.instance2 }}
tag: cy:headless:stable:groupB:school_api_test:ci
environment: ${{ needs.e2e-system-tests.outputs.environment }}
groups: group-B
notify_RC:
runs-on: ubuntu-latest
needs:
- e2e-system-tests
- run-tests-groupA
- run-tests-groupB
if: |
always()
steps:
- uses: technote-space/workflow-conclusion-action@v3
- name: Send Notification to Rocket Chat
uses: RocketChat/[email protected]
with:
type: ${{ env.WORKFLOW_CONCLUSION }}
job_name: "Cypress Tests"
url: ${{ secrets.RC_WEBHOOK_URL }}
username: Manual Trigger Test Run