Skip to content

feat: add CircleCI job for maestro E2E tests#1699

Draft
ajpallares wants to merge 16 commits intoadd-maestro-e2e-testfrom
add-maestro-e2e-test-ci-job
Draft

feat: add CircleCI job for maestro E2E tests#1699
ajpallares wants to merge 16 commits intoadd-maestro-e2e-testfrom
add-maestro-e2e-test-ci-job

Conversation

@ajpallares
Copy link
Copy Markdown
Contributor

@ajpallares ajpallares commented Mar 25, 2026

Summary

  • Adds two separate CircleCI workflows triggered by the maestro_e2e_tests schedule:
    • maestro-e2e-tests-ios: runs on macOS executor, builds the test app for iOS simulator, runs Maestro tests
    • maestro-e2e-tests-android: runs on android:2024.11.1 machine image, creates an Android emulator, builds a debug APK, runs Maestro tests
  • Adds two Fastlane lanes:
    • run_maestro_e2e_tests_ios: replaces API key placeholder, installs deps, builds via xcodebuild, installs on simulator
    • run_maestro_e2e_tests_android: replaces API key placeholder, installs deps, builds via Gradle, installs via adb
  • Both lanes use $RC_E2E_TEST_API_KEY_PRODUCTION_TEST_STORE from the e2e-tests CircleCI context
  • Test results stored as JUnit artifacts

Depends on #1698

@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 96cad0e to 5f4fc0e Compare March 25, 2026 16:09
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 8f8eb7b to effa822 Compare March 25, 2026 16:10
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 5f4fc0e to 979b0a5 Compare March 25, 2026 16:20
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from effa822 to ab777d6 Compare March 25, 2026 16:20
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 979b0a5 to 100d385 Compare March 25, 2026 16:24
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch 2 times, most recently from 4534287 to 43395b2 Compare March 25, 2026 16:45
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 991867f to a5cac25 Compare March 25, 2026 17:09
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch 3 times, most recently from b2dda81 to 5ad518b Compare March 30, 2026 08:33
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from e776f81 to 89bd52c Compare March 30, 2026 11:16
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch 3 times, most recently from cfe5590 to da877f5 Compare March 30, 2026 11:45
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 1cf8fed to b266f9e Compare March 30, 2026 14:41
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from da877f5 to 1fcdee4 Compare March 30, 2026 14:41
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from b266f9e to 82563b8 Compare March 30, 2026 15:03
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 1fcdee4 to 0265781 Compare March 30, 2026 15:03
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 82563b8 to 067a74c Compare March 30, 2026 15:16
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 0265781 to 073a93f Compare March 30, 2026 15:16
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 067a74c to 6893fcf Compare March 30, 2026 15:30
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 073a93f to 65ab3dc Compare March 30, 2026 15:30
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 6893fcf to c01f963 Compare March 30, 2026 17:06
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 1f6ac86 to e6fe691 Compare March 30, 2026 17:06
Split the single maestro-e2e-tests workflow into two independent
workflows (maestro-e2e-tests-ios and maestro-e2e-tests-android) so
they run in parallel on their respective platforms.

Made-with: Cursor
- Prefix Dir.chdir and maestro test paths with ../ since Fastlane
  runs from the fastlane/ subdirectory
- Wait for sys.boot_completed before sending keyevent to emulator

Made-with: Cursor
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from c01f963 to 691052f Compare March 30, 2026 17:21
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from da16a41 to 5f321fc Compare March 30, 2026 17:21
iOS: Add flutter precache --ios before pod install to ensure
Flutter.xcframework exists for the Podfile post-install hook.

Android: Add adb start-server and adb wait-for-device before adb
install to handle potential ADB disconnection during flutter build.

Made-with: Cursor
- Add --test-output-dir to maestro commands so screenshots are stored
  as CI artifacts
- Add takeScreenshot steps to Maestro flow for CI debugging

Made-with: Cursor
The emulator may die (OOM) during the long flutter build apk step.
Add timeout-based detection and automatic emulator restart if no
device is found within 30 seconds after the build completes.

Made-with: Cursor
Follow purchases-android pattern for emulator management:
- Use android orb create-avd/start-emulator for proper AVD lifecycle
- Split Fastlane lane into build_maestro_app_android + run_maestro_e2e_tests_android
- Build app first (memory-intensive), then create/start emulator
- Eliminates OOM risk from concurrent build + emulator
- Remove hacky emulator recovery logic
- Reuse android-machine-emulator executor alias for consistency

Made-with: Cursor
Move takeScreenshot before the extendedWaitUntil step so we capture
what's on screen even when the wait times out and fails the test.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant