-
Notifications
You must be signed in to change notification settings - Fork 2
136 lines (128 loc) · 4.88 KB
/
Copy pathlive-stack.yml
File metadata and controls
136 lines (128 loc) · 4.88 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Full stack e2e
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
workflow_run:
workflows: ["Canary — plugin vs Codex main"]
types: [completed]
concurrency:
group: inkbox-live-aut-tunnel
cancel-in-progress: false
queue: max
jobs:
channels:
if: >
(github.event_name == 'pull_request' &&
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main')
uses: ./.github/workflows/live-channels.yml
with:
orchestrated: true
secrets: inherit
a2a:
needs: channels
if: >
!cancelled() &&
((github.event_name == 'pull_request' &&
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main'))
uses: ./.github/workflows/live-a2a.yml
with:
orchestrated: true
secrets: inherit
voice:
needs: a2a
if: >
!cancelled() &&
((github.event_name == 'pull_request' &&
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main'))
uses: ./.github/workflows/live-voice.yml
with:
orchestrated: true
# The inbound PSTN carrier currently rejects the call before it reaches
# the AUT. Keep that leg manually runnable; gate PRs on plugin-owned voice.
include_inbound: true
secrets: inherit
external-events:
needs: voice
if: >
!cancelled() &&
((github.event_name == 'pull_request' &&
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main'))
uses: ./.github/workflows/live-external-events.yml
with:
orchestrated: true
secrets: inherit
full-stack:
name: full-stack
needs: [channels, a2a, voice, external-events]
if: >
!cancelled() &&
((github.event_name == 'pull_request' &&
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository) ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main'))
runs-on: ubuntu-latest
steps:
- name: Require every live suite to pass
env:
CHANNELS_RESULT: ${{ needs.channels.result }}
A2A_RESULT: ${{ needs.a2a.result }}
VOICE_RESULT: ${{ needs.voice.result }}
EXTERNAL_EVENTS_RESULT: ${{ needs.external-events.result }}
run: |
failed=0
for suite in CHANNELS A2A VOICE EXTERNAL_EVENTS; do
result_var="${suite}_RESULT"
result="${!result_var}"
echo "$suite: $result"
if [ "$result" != "success" ]; then failed=1; fi
done
exit "$failed"
notify:
needs: [channels, a2a, voice, external-events, full-stack]
if: >
always() &&
github.event_name == 'workflow_run' &&
github.event.workflow_run.event == 'schedule' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main' &&
(needs.channels.result != 'success' ||
needs.a2a.result != 'success' ||
needs.voice.result != 'success' ||
needs.external-events.result != 'success' ||
needs.full-stack.result != 'success')
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Notify Google Chat
env:
WEBHOOK_URL: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
run: |
[ -n "$WEBHOOK_URL" ] || { echo "GOOGLE_CHAT_WEBHOOK_URL is missing"; exit 1; }
curl --fail-with-body --retry 3 --retry-all-errors --max-time 20 \
-sS -X POST -H 'Content-Type: application/json' \
-d "{\"text\": \"🚨 codex-plugin full-stack e2e FAILED (chained off the canary): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \
"$WEBHOOK_URL"