-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (76 loc) · 3.14 KB
/
Copy pathlive-external-events.yml
File metadata and controls
85 lines (76 loc) · 3.14 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
name: Live — external events (webhook → agent acts)
# Boots the AUT gateway with external events enabled, POSTs a signed
# GitHub-shaped webhook at its local listener instructing it to text the
# remote identity, and verifies the SMS actually arrives. Real model + real
# send, so this runs only on ready (non-draft) PRs + dispatch, and shares the
# AUT tunnel lock with the other live suites.
on:
workflow_call:
inputs:
timeout_s:
description: "Seconds to wait for the external-event model turn"
required: false
type: string
default: "200"
orchestrated:
description: "True when the full-stack workflow owns the shared live lock"
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
timeout_s:
description: "Seconds to wait for the agent's SMS"
default: "200"
permissions:
contents: read
concurrency:
group: ${{ inputs.orchestrated && format('inkbox-live-child-{0}', github.run_id) || 'inkbox-live-aut-tunnel' }}
cancel-in-progress: false
queue: max
jobs:
external-events:
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- name: Install locked dependencies
run: |
bash "$GITHUB_WORKSPACE/tests/ci/npm_with_retry.sh" ci
bash "$GITHUB_WORKSPACE/tests/ci/npm_with_retry.sh" install --no-save --package-lock=false \
@inkbox/sdk@0.5.9 \
@opencode-ai/sdk@1.17.18 @opencode-ai/plugin@1.17.18
- run: bash "$GITHUB_WORKSPACE/tests/ci/npm_with_retry.sh" install -g opencode-ai@latest
- name: Boot the AUT gateway (real model, external events on)
env:
MODE: real
AUT_INKBOX_API_KEY: ${{ secrets.AUT_INKBOX_API_KEY }}
AUT_INKBOX_SIGNING_KEY: ${{ secrets.AUT_INKBOX_SIGNING_KEY }}
INKBOX_BASE_URL: ${{ vars.INKBOX_BASE_URL }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
INKBOX_WEBHOOK_SECRET_GITHUB: ${{ secrets.LIVE_GITHUB_WEBHOOK_SECRET }}
INKBOX_VOICEMAIL_DETECTION: "disabled"
run: bash scripts/live-aut.sh
- name: Run external-event test
env:
AUT_INKBOX_API_KEY: ${{ secrets.AUT_INKBOX_API_KEY }}
REMOTE_INKBOX_API_KEY: ${{ secrets.REMOTE_INKBOX_API_KEY }}
INKBOX_BASE_URL: ${{ vars.INKBOX_BASE_URL }}
INKBOX_WEBHOOK_SECRET_GITHUB: ${{ secrets.LIVE_GITHUB_WEBHOOK_SECRET }}
LIVE_REAL_MODEL: "1"
LIVE_REPLY_TIMEOUT_S: ${{ inputs.timeout_s || '200' }}
run: |
npx vitest run --config vitest.live.config.ts tests/live/external-event.test.ts
- name: Report content-free failure state
if: failure()
run: |
test -s "$AUT_GATEWAY_LOG" && echo "gateway_log=present" || echo "gateway_log=empty"
test -s "$AUT_SERVE_LOG" && echo "serve_log=present" || echo "serve_log=empty"
- name: Tear down (always)
if: always()
run: |
kill "$AUT_GATEWAY_PID" 2>/dev/null || true
kill "$AUT_SERVE_PID" 2>/dev/null || true