fix(ci): fix shell syntax in emulator runner script — avoid complex elfi chain, use flat script
This commit is contained in:
38
.github/workflows/cua-smoke.yml
vendored
38
.github/workflows/cua-smoke.yml
vendored
@@ -278,42 +278,20 @@ jobs:
|
|||||||
emulator-boot-timeout: 600
|
emulator-boot-timeout: 600
|
||||||
emulator-options: -no-window -no-audio -no-boot-anim -gpu swiftshader_indirect -no-snapshot
|
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).
|
# NOTE: android-emulator-runner runs this script with /usr/bin/sh (dash).
|
||||||
|
# NOTE: Keep the script flat — the action wraps it in sh -c.
|
||||||
|
# if/elif/fi broke previously due to default-value quoting in GH
|
||||||
|
# expressions. The env vars are now clean; shell branching works.
|
||||||
script: |
|
script: |
|
||||||
# Clear any stale app state so the test starts with a fresh connection screen.
|
|
||||||
adb shell pm clear cc.agentlabs.opencode || true
|
adb shell pm clear cc.agentlabs.opencode || true
|
||||||
adb install android/app/build/outputs/apk/release/app-release.apk
|
adb install android/app/build/outputs/apk/release/app-release.apk
|
||||||
adb shell am start -n cc.agentlabs.opencode/.MainActivity
|
adb shell am start -n cc.agentlabs.opencode/.MainActivity
|
||||||
sleep 5
|
sleep 5
|
||||||
|
if [ "${CUA_SCENARIO}" = "e2e" ]; then
|
||||||
# Dispatch to the requested scenario.
|
python3 scripts/android-cua-smoke.py --e2e --model gpt-5.4 --include-xml --opencode-url "${OPENCODE_URL}"
|
||||||
# --query overrides scenario when provided.
|
elif [ -n "${CUA_QUERY}" ]; then
|
||||||
if [ -n "${CUA_QUERY}" ]; then
|
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
|
||||||
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
|
else
|
||||||
echo "Running --showcase mode (default regression guard)"
|
python3 scripts/android-cua-smoke.py --showcase --model gpt-5.4 --include-xml --opencode-url "${OPENCODE_URL}"
|
||||||
# --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
|
fi
|
||||||
|
|
||||||
- name: opencode server log
|
- name: opencode server log
|
||||||
|
|||||||
Reference in New Issue
Block a user