Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- renovate/**
pull_request:
branches: [main]
workflow_dispatch:
workflow_call: # Allow this workflow to be called by other workflows

jobs:
Expand Down Expand Up @@ -94,15 +95,25 @@ jobs:
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Setup Android SDK tools
uses: android-actions/setup-android@v3
- name: Install Maestro CLI
run: |
export MAESTRO_VERSION=2.4.0
curl -Ls "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> "$GITHUB_PATH"
- name: Run Android Maestro flows
run: cd example-app && ./scripts/run-maestro-android-ci.sh
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
target: google_atd
arch: x86_64
profile: pixel_6
emulator-boot-timeout: 900
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none
disable-animations: true
script: |
./example-app/android/gradlew -p ./example-app/android assembleDebug
adb install -r example-app/android/app/build/outputs/apk/debug/app-debug.apk
cd example-app && bun run maestro:android
- name: Upload Android Maestro artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion example-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bun run maestro:ios
bun run maestro:android
```

The Android script bootstraps Maestro's embedded driver APKs explicitly, starts the instrumentation runner, and forwards the gRPC bridge before running the flows. That makes local Android runs match CI instead of depending on Maestro's flaky auto-bootstrap behavior.
The Android script bootstraps Maestro's embedded driver APKs explicitly and starts the instrumentation runner before running the flows. The CLI still owns the ADB port-forward setup so local runs match CI without fighting Maestro's session setup.

### Native sync

Expand Down
153 changes: 0 additions & 153 deletions example-app/scripts/run-maestro-android-ci.sh

This file was deleted.

4 changes: 0 additions & 4 deletions example-app/scripts/run-maestro-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ if [[ "${DRIVER_READY:-0}" -ne 1 ]]; then
exit 1
fi

adb -s "$DEVICE_ID" forward --remove tcp:7001 >/dev/null 2>&1 || true
adb -s "$DEVICE_ID" forward tcp:7001 tcp:7001 >/dev/null
sleep 2

JAVA_TOOL_OPTIONS=-Djava.net.preferIPv4Stack=true maestro test \
--no-reinstall-driver \
-p android \
Expand Down
Loading