docs: add --e2e and --query to CI dispatch + AGENTS.md
cua-smoke.yml: - Add scenario/query/e2e_* workflow_dispatch inputs - Runner step dispatches to --query / --e2e / --showcase based on inputs - Upload /tmp/cua_eval_report.json as artifact (--query output) AGENTS.md: - Document all 3 run modes: --showcase, --e2e, --query - List available models on dev server (deepseek-v4-flash-free etc.) - Add dispatch inputs reference for CI - Add --e2e / --query to 'when to run' guidance Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
73
.github/workflows/cua-smoke.yml
vendored
73
.github/workflows/cua-smoke.yml
vendored
@@ -7,6 +7,34 @@ on:
|
||||
description: "OpenCode server URL (overrides default). Use Tailscale URL for a live server."
|
||||
required: false
|
||||
default: ""
|
||||
scenario:
|
||||
description: "Test scenario to run (default: showcase)"
|
||||
required: false
|
||||
default: "showcase"
|
||||
type: choice
|
||||
options:
|
||||
- showcase
|
||||
- e2e
|
||||
e2e_project_dir:
|
||||
description: "[e2e] Project directory on the server (default: ~/workspace/opencode-mobile)"
|
||||
required: false
|
||||
default: "~/workspace/opencode-mobile"
|
||||
e2e_model_hint:
|
||||
description: "[e2e] Model name substring to select in picker (default: deepseek)"
|
||||
required: false
|
||||
default: "deepseek"
|
||||
e2e_task:
|
||||
description: "[e2e] Coding task to submit to the AI agent"
|
||||
required: false
|
||||
default: "Write a hello_world.py file that prints 'Hello World' to stdout."
|
||||
e2e_filename:
|
||||
description: "[e2e] Expected output filename to validate"
|
||||
required: false
|
||||
default: "hello_world.py"
|
||||
query:
|
||||
description: "Natural-language test query (enables --query mode, overrides scenario)"
|
||||
required: false
|
||||
default: ""
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*"]
|
||||
@@ -236,6 +264,12 @@ jobs:
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
env:
|
||||
OPENCODE_URL: ${{ env.OPENCODE_URL }}
|
||||
CUA_SCENARIO: ${{ inputs.scenario || 'showcase' }}
|
||||
CUA_QUERY: ${{ inputs.query || '' }}
|
||||
CUA_E2E_PROJECT_DIR: ${{ inputs.e2e_project_dir || '~/workspace/opencode-mobile' }}
|
||||
CUA_E2E_MODEL_HINT: ${{ inputs.e2e_model_hint || 'deepseek' }}
|
||||
CUA_E2E_TASK: ${{ inputs.e2e_task || "Write a hello_world.py file that prints 'Hello World' to stdout." }}
|
||||
CUA_E2E_FILENAME: ${{ inputs.e2e_filename || 'hello_world.py' }}
|
||||
with:
|
||||
api-level: 28
|
||||
arch: x86_64
|
||||
@@ -245,16 +279,42 @@ jobs:
|
||||
emulator-options: -no-window -no-audio -no-boot-anim -gpu swiftshader_indirect -no-snapshot
|
||||
# NOTE: android-emulator-runner runs this script with /usr/bin/sh (dash).
|
||||
script: |
|
||||
# Clear any stale app state so the showcase starts with a fresh connection screen.
|
||||
# Clear any stale app state so the test starts with a fresh connection screen.
|
||||
adb shell pm clear cc.agentlabs.opencode || true
|
||||
adb install android/app/build/outputs/apk/release/app-release.apk
|
||||
adb shell am start -n cc.agentlabs.opencode/.MainActivity
|
||||
sleep 5
|
||||
# --showcase runs the structured onboarding flow which includes:
|
||||
# session_list: pre-created session MUST appear (not empty-list-ok)
|
||||
# sessions_reload: navigate back from session, list must be non-empty
|
||||
# These are the regression guards for the "sessions not loading" bug.
|
||||
python3 scripts/android-cua-smoke.py --showcase --model gpt-5.4 --include-xml --opencode-url "${OPENCODE_URL}"
|
||||
|
||||
# Dispatch to the requested scenario.
|
||||
# --query overrides scenario when provided.
|
||||
if [ -n "${CUA_QUERY}" ]; then
|
||||
echo "Running --query mode"
|
||||
python3 scripts/android-cua-smoke.py \
|
||||
--query "${CUA_QUERY}" \
|
||||
--model gpt-5.4 --include-xml \
|
||||
--opencode-url "${OPENCODE_URL}" \
|
||||
--eval-output /tmp/cua_eval_report.json
|
||||
elif [ "${CUA_SCENARIO}" = "e2e" ]; then
|
||||
echo "Running --e2e mode"
|
||||
python3 scripts/android-cua-smoke.py \
|
||||
--e2e \
|
||||
--model gpt-5.4 --include-xml \
|
||||
--opencode-url "${OPENCODE_URL}" \
|
||||
--e2e-project-dir "${CUA_E2E_PROJECT_DIR}" \
|
||||
--e2e-model-hint "${CUA_E2E_MODEL_HINT}" \
|
||||
--e2e-task "${CUA_E2E_TASK}" \
|
||||
--e2e-filename "${CUA_E2E_FILENAME}"
|
||||
else
|
||||
echo "Running --showcase mode (default regression guard)"
|
||||
# --showcase runs the structured onboarding flow which includes:
|
||||
# session_list: pre-created session MUST appear (not empty-list-ok)
|
||||
# sessions_reload: navigate back from session, list must be non-empty
|
||||
# These are the regression guards for the "sessions not loading" bug.
|
||||
python3 scripts/android-cua-smoke.py \
|
||||
--showcase \
|
||||
--model gpt-5.4 --include-xml \
|
||||
--opencode-url "${OPENCODE_URL}"
|
||||
fi
|
||||
|
||||
- name: opencode server log
|
||||
if: always()
|
||||
@@ -268,4 +328,5 @@ jobs:
|
||||
path: |
|
||||
/tmp/cua_*.png
|
||||
/tmp/cua_*.mp4
|
||||
/tmp/cua_eval_report.json
|
||||
if-no-files-found: ignore
|
||||
|
||||
Reference in New Issue
Block a user