ci(cua): add opencode_url dispatch input for live server testing

When dispatched with opencode_url set (e.g. Tailscale URL), the workflow
skips starting a local opencode server and the model probe, and points the
emulator directly at the external server.

This allows running the full CUA test against a live dev server without
depending on the flaky CI-hosted opencode serve setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Dennis V
2026-06-23 08:45:34 +00:00
parent ca33f246e4
commit 1dafdcbc65

View File

@@ -2,6 +2,11 @@ name: CUA Smoke Test
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
opencode_url:
description: "OpenCode server URL (overrides default). Use Tailscale URL for a live server."
required: false
default: ""
push: push:
branches: [main] branches: [main]
tags: ["v*"] tags: ["v*"]
@@ -27,9 +32,8 @@ jobs:
# which makes send_message/multi_turn scenarios get skipped (#22). # which makes send_message/multi_turn scenarios get skipped (#22).
# `preview` is also the @ai-sdk/azure 3.x default. # `preview` is also the @ai-sdk/azure 3.x default.
OPENCODE_AZURE_API_VERSION: "preview" OPENCODE_AZURE_API_VERSION: "preview"
# Android emulator reaches the runner host loopback via 10.0.2.2. # Default: emulator reaches runner host via 10.0.2.2. Override with dispatch input for live server.
# A real `opencode serve` runs on the host (see steps below), making this a true E2E. OPENCODE_URL: ${{ inputs.opencode_url != '' && inputs.opencode_url || 'http://10.0.2.2:4096' }}
OPENCODE_URL: "http://10.0.2.2:4096"
ARCHIVEBOX_URL: ${{ secrets.ARCHIVEBOX_URL }} ARCHIVEBOX_URL: ${{ secrets.ARCHIVEBOX_URL }}
ARCHIVEBOX_API_KEY: ${{ secrets.ARCHIVEBOX_API_KEY }} ARCHIVEBOX_API_KEY: ${{ secrets.ARCHIVEBOX_API_KEY }}
steps: steps:
@@ -126,6 +130,7 @@ jobs:
echo "opencode.json written:"; cat "$HOME/.config/opencode/opencode.json" echo "opencode.json written:"; cat "$HOME/.config/opencode/opencode.json"
- name: Start opencode server on runner host - name: Start opencode server on runner host
if: ${{ inputs.opencode_url == '' }}
run: | run: |
set -x set -x
# Bind all interfaces so the emulator can reach it via 10.0.2.2. # Bind all interfaces so the emulator can reach it via 10.0.2.2.
@@ -164,6 +169,7 @@ jobs:
- name: Probe opencode model capability (can it reply?) - name: Probe opencode model capability (can it reply?)
id: probe id: probe
if: ${{ inputs.opencode_url == '' }}
env: env:
AZURE_OPENAI_MODEL: "gpt-5.4" AZURE_OPENAI_MODEL: "gpt-5.4"
run: | run: |