Skip to content

Commit f587454

Browse files
committed
feat: Add GitHub Actions workflow to trigger IIAB integration tests
This workflow enables automated integration testing with Internet-in-a-Box (IIAB): - Triggers on PR labeled 'test-iiab-integration' - Triggers on merge to master - Dispatches events to ascoderu/iiab-lokole-tests repository - Posts test results back to PRs Related to integration test suite at: https://github.com/ascoderu/iiab-lokole-tests
1 parent c3e892e commit f587454

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Trigger Integration Tests
2+
3+
on:
4+
pull_request:
5+
types: [labeled, synchronize]
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
trigger-on-label:
12+
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test-iiab-integration')
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Trigger integration tests
17+
uses: peter-evans/repository-dispatch@v2
18+
with:
19+
token: ${{ secrets.INTEGRATION_TEST_PAT }}
20+
repository: ascoderu/iiab-lokole-tests
21+
event-type: test-integration-lokole
22+
client-payload: |
23+
{
24+
"pr_number": ${{ github.event.pull_request.number }},
25+
"ref": "${{ github.event.pull_request.head.ref }}",
26+
"sha": "${{ github.event.pull_request.head.sha }}",
27+
"repo": "${{ github.repository }}"
28+
}
29+
30+
trigger-on-merge:
31+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- name: Trigger post-merge tests
36+
uses: peter-evans/repository-dispatch@v2
37+
with:
38+
token: ${{ secrets.INTEGRATION_TEST_PAT }}
39+
repository: ascoderu/iiab-lokole-tests
40+
event-type: lokole-merged
41+
client-payload: |
42+
{
43+
"branch": "${{ github.ref_name }}",
44+
"sha": "${{ github.sha }}",
45+
"repo": "${{ github.repository }}"
46+
}

0 commit comments

Comments
 (0)