Skip to content

Commit e004988

Browse files
authored
ci: add inference smoke test on every PR (#159)
1 parent 1158c1e commit e004988

7 files changed

Lines changed: 357 additions & 8 deletions

File tree

.env.schema

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ GEMINI_API_KEY=
3131
# @docs(https://opencode.ai)
3232
OPENCODE_ZEN_API_KEY=
3333

34+
# Override auto-detected model (e.g. anthropic/claude-haiku for CI)
35+
# @sensitive=false @type=string
36+
BAUDBOT_MODEL=
37+
3438
# ── Slack ────────────────────────────────────────────────────────────────────
3539

3640
# Slack bot OAuth token (required for direct Socket Mode, optional in broker mode)

.github/workflows/integration.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
setup_script: bin/ci/setup-arch.sh
7272

7373
name: ${{ matrix.distro }}
74-
timeout-minutes: 10
74+
timeout-minutes: 15
7575

7676
steps:
7777
- uses: actions/checkout@v4
@@ -115,7 +115,8 @@ jobs:
115115
bash bin/ci/droplet.sh run \
116116
"${{ steps.droplet.outputs.DROPLET_IP }}" \
117117
~/.ssh/ci_key \
118-
"${{ matrix.setup_script }}"
118+
"${{ matrix.setup_script }}" \
119+
"CI_ANTHROPIC_API_KEY=${{ secrets.CI_ANTHROPIC_API_KEY }}"
119120
120121
- name: Cleanup
121122
if: always()

bin/ci/droplet.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,20 @@ cmd_wait_ssh() {
184184

185185
# ── run <ip> <ssh_private_key_file> <script> ──────────────────────────────────
186186
cmd_run() {
187-
local ip="${1:?Usage: droplet.sh run <ip> <ssh_private_key_file> <script>}"
187+
local ip="${1:?Usage: droplet.sh run <ip> <ssh_private_key_file> <script> [env_vars...]}"
188188
local key_file="${2:?}"
189189
local script="${3:?}"
190-
191-
ssh -o StrictHostKeyChecking=no -o BatchMode=yes \
192-
-i "$key_file" "root@$ip" bash -s < "$script"
190+
shift 3
191+
192+
# Remaining args are KEY=VALUE env vars forwarded to the remote script.
193+
# Prepend export statements so the remote bash -s session inherits them.
194+
{
195+
for var in "$@"; do
196+
printf 'export %s\n' "$var"
197+
done
198+
cat "$script"
199+
} | ssh -o StrictHostKeyChecking=no -o BatchMode=yes \
200+
-i "$key_file" "root@$ip" bash -s
193201
}
194202

195203
# ── list ──────────────────────────────────────────────────────────────────────

bin/ci/setup-arch.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ bash /home/baudbot_admin/baudbot/bin/ci/smoke-cli.sh
7070
echo "=== Running runtime smoke checks ==="
7171
bash /home/baudbot_admin/baudbot/bin/ci/smoke-agent-runtime.sh
7272

73+
echo "=== Running inference smoke check ==="
74+
bash /home/baudbot_admin/baudbot/bin/ci/smoke-agent-inference.sh
75+
7376
echo "=== Installing test dependencies ==="
7477
export PATH="/home/baudbot_agent/opt/node/bin:$PATH"
7578
cd /home/baudbot_admin/baudbot

bin/ci/setup-ubuntu.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ bash /home/baudbot_admin/baudbot/bin/ci/smoke-cli.sh
108108
echo "=== Running runtime smoke checks ==="
109109
bash /home/baudbot_admin/baudbot/bin/ci/smoke-agent-runtime.sh
110110

111+
echo "=== Running inference smoke check ==="
112+
bash /home/baudbot_admin/baudbot/bin/ci/smoke-agent-inference.sh
113+
111114
echo "=== Installing test dependencies ==="
112115
export PATH="/home/baudbot_agent/opt/node/bin:$PATH"
113116
cd /home/baudbot_admin/baudbot

0 commit comments

Comments
 (0)