From 1f59602fce047831f7a728fbd29100ad66c68301 Mon Sep 17 00:00:00 2001 From: Dennis V <2119348+dzianisv@users.noreply.github.com> Date: Wed, 24 Jun 2026 06:42:18 +0000 Subject: [PATCH] =?UTF-8?q?fix(ci):=20fix=20shell=20syntax=20in=20emulator?= =?UTF-8?q?=20runner=20script=20=E2=80=94=20avoid=20complex=20elfi=20chain?= =?UTF-8?q?,=20use=20flat=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cua-smoke.yml | 38 +++++++-------------------------- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/.github/workflows/cua-smoke.yml b/.github/workflows/cua-smoke.yml index e1b6821..b06ccda 100644 --- a/.github/workflows/cua-smoke.yml +++ b/.github/workflows/cua-smoke.yml @@ -278,42 +278,20 @@ jobs: emulator-boot-timeout: 600 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: 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: | - # 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 - - # 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}" + if [ "${CUA_SCENARIO}" = "e2e" ]; then + python3 scripts/android-cua-smoke.py --e2e --model gpt-5.4 --include-xml --opencode-url "${OPENCODE_URL}" + elif [ -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 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}" + python3 scripts/android-cua-smoke.py --showcase --model gpt-5.4 --include-xml --opencode-url "${OPENCODE_URL}" fi - name: opencode server log