fix(ci): add emulator to PATH and increase CUA smoke timeout to 60min (#27)

* fix(ci): add emulator to PATH and increase CUA smoke timeout to 60min

- Add 'Add emulator to PATH' step after setup-android so emulator binary
  is found (was: command not found, causing adb wait-for-device to hang
  until the 30min job timeout)
- Increase timeout-minutes from 30 to 60 to accommodate full build
- Add npm cache and Gradle cache (same as build.yml) to speed up rebuild

* fix: address code review findings for cua-emulator-path

- Fix stale Gradle cache causing build failure after package rename
  (ai.opencode.mobile → cc.agentlabs.opencode): add purge step matching
  the one already present in publish-play-store.yml
- Fix adb launch command using old package name ai.opencode.mobile;
  updated to cc.agentlabs.opencode/.MainActivity

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JKGMRpgihA4io2frodqLjt

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Den
2026-06-20 02:56:44 -07:00
committed by GitHub
parent 71a1feb232
commit 9365a72e93

View File

@@ -14,7 +14,7 @@ on:
jobs:
cua-test:
runs-on: ubuntu-latest
timeout-minutes: 45
timeout-minutes: 60
env:
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
@@ -48,6 +48,9 @@ jobs:
- name: Setup Android SDK
uses: android-actions/setup-android@v4
- name: Add emulator to PATH
run: echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
@@ -65,6 +68,15 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Purge stale generated sources
# The Gradle cache (restore-keys prefix fallback) can restore a
# generated autolinking tree from a previous package id. Gradle then
# reuses ReactNativeApplicationEntryPoint.java referencing the OLD
# package (ai.opencode.mobile.BuildConfig) and compileReleaseJavaWithJavac
# fails. Delete generated sources so prebuild + Gradle regenerate them
# for the current package (cc.agentlabs.opencode).
run: rm -rf android/app/build/generated android/build/generated android/app/build/intermediates
- name: Install dependencies & build APK
env:
SENTRY_DISABLE_AUTO_UPLOAD: "true"