forked from henryjw/trigger-workflow-and-wait
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.13 KB
/
selftest.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
name: Self-test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run_e2e:
name: run_e2e
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [test01, test02, test03, test04]
steps:
- uses: actions/checkout@v3
- uses: ./
name: trigger ${{ matrix.target }} and wait for it
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
github_token: ${{ secrets.GH_DISPATCH_TOKEN }}
workflow_file_name: dispatch_workflow.yml
ref: ${{ github.ref_name }}
wait_interval: 3
run_name: "Dispatch ${{ matrix.target }}"
client_payload: |
{
"testsuite": "${{ matrix.target }}",
"run-name": "Dispatch ${{ matrix.target }}",
"fail_case": "test02"
}
propagate_failure: ${{ matrix.target != 'test02' }} # The `fail_case` test is expected failure, so we don't want to propagate the failure in this case
trigger_workflow: true
wait_workflow: true