Add CircleCI job for maestro E2E tests#838
Draft
ajpallares wants to merge 54 commits into
Draft
Conversation
8bfcd72 to
bc1a466
Compare
0330464 to
4758548
Compare
d63ba2b to
a51924b
Compare
39ef1ec to
58e0f4c
Compare
1d7dd45 to
2b7a6e3
Compare
5fe0ada to
54374aa
Compare
32fdb8c to
17b7c23
Compare
ee1e465 to
10a37d7
Compare
17b7c23 to
b3bc307
Compare
10a37d7 to
df2c385
Compare
b3bc307 to
0aabd7a
Compare
df2c385 to
dd86a57
Compare
0aabd7a to
3978de4
Compare
2b8e38d to
14636ed
Compare
dd86a57 to
a5c35a8
Compare
371580e to
f911bc5
Compare
Made-with: Cursor
Made-with: Cursor
f911bc5 to
7ccb29f
Compare
Fail fast with a clear error if RC_E2E_TEST_API_KEY_PRODUCTION_TEST_STORE is not set, instead of silently replacing the placeholder with an empty string and crashing at runtime. Made-with: Cursor
The CircleCI xcode:26.3.0 image already has the simulator runtime pre-installed. The download step was likely interfering with the pre-installed runtime, causing xcodebuild to find zero simulator destinations. This matches the working purchases-capacitor CI pattern. Made-with: Cursor
The Unity-generated Xcode project doesn't list specific simulator devices as available destinations. Use generic/platform=iOS Simulator instead, which builds for the simulator architecture without requiring a named device. Added a diagnostic step to understand the project's build settings and available destinations. Made-with: Cursor
Unity-generated Xcode projects set SUPPORTED_PLATFORMS to only iphoneos, excluding iphonesimulator. Override this build setting so xcodebuild recognizes simulator as a valid destination. Made-with: Cursor
Remove -destination flag entirely to bypass the scheme destination resolver, which blocks simulator builds for Unity projects. Use explicit -arch arm64 and -sdk iphonesimulator with the build action. Made-with: Cursor
Made-with: Cursor # Conflicts: # fastlane/Fastfile
Set ANDROID_HOME and add platform-tools/emulator directories to PATH after installing android-commandlinetools via brew, so adb and emulator binaries are accessible in subsequent CI steps. Made-with: Cursor
Swift pods need framework-style integration to properly generate and expose their -Swift.h umbrella headers. Using static linkage keeps binary size down while enabling module imports in the UnityFramework target. Made-with: Cursor
Unity's IL2CPP compilation in Docker generates device-only binaries that can't be linked for the iOS Simulator. Move the iOS job to a self-contained macOS runner that installs Unity Hub + Editor, builds the Unity project natively, runs pod install + xcodebuild, and executes Maestro tests. The Android Docker build + macOS test runner split remains unchanged. Made-with: Cursor
Unity Hub requires the changeset hash to resolve non-LTS versions. Made-with: Cursor
The Unity Hub prompts interactively for architecture selection even in headless mode. Pass --architecture arm64 to skip the prompt. Made-with: Cursor
Use android:2025.10.1 machine image with circleci/android orb for emulator management, matching all other SDK repos. This provides KVM-accelerated x86_64 emulators instead of the problematic ARM emulator on macOS. Made-with: Cursor
Unity Editor requires Rosetta 2 on Apple Silicon machines. Made-with: Cursor
Made-with: Cursor
Unity Hub installs modules at the top-level PlaybackEngines directory but the editor in batchmode looks inside Unity.app/Contents/PlaybackEngines. Create a symlink so the iOS build target is found. Made-with: Cursor
The Unity licensing server occasionally times out during ULF activation. Retry up to 3 times with 30s delays, and verify the license file exists after activation. Made-with: Cursor
Made-with: Cursor
ajpallares
added a commit
that referenced
this pull request
Apr 30, 2026
### Description This was only caught by the two new (still-WIP) `run-maestro-e2e-tests-ios` / `run-maestro-e2e-tests-android` jobs being added in [#838](#838), which are the only jobs invoking lanes from the top-level `fastlane/Fastfile` (the existing `archive-ios` job uses `IntegrationTests/fastlane/Fastfile`, which already has `update_fastlane` commented out). They started failing today with: ``` Could not find fastlane-2.233.0 in locally installed gems ``` (see [failing job](https://app.circleci.com/pipelines/github/RevenueCat/purchases-unity/4019/workflows/1bb4e4ac-f6b1-47d9-b91e-eed316c4387d/jobs/20258)) after [fastlane 2.233.1](https://rubygems.org/gems/fastlane/versions/2.233.1) was released. The `update_fastlane` action in `before_all` calls `gem update fastlane` and then `gem cleanup` ([source](https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/update_fastlane.rb)), which deletes the previous fastlane version. When fastlane restarts itself, `bundle exec` then fails to find the version pinned in `Gemfile.lock`. `update_fastlane` is redundant when using Bundler (we already update fastlane through dependency PRs), so removing it from `before_all`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
maestro_e2e_testsschedule:maestro-e2e-tests-ios: runs on macOS executor, builds the test app for iOS simulator, runs Maestro testsmaestro-e2e-tests-android: runs onandroid:2024.11.1machine image, creates an Android emulator, builds a debug APK, runs Maestro testsrun_maestro_e2e_tests_ios: replaces API key placeholder, installs deps, builds via xcodebuild, installs on simulatorrun_maestro_e2e_tests_android: replaces API key placeholder, installs deps, builds via Gradle, installs via adb$RC_E2E_TEST_API_KEY_PRODUCTION_TEST_STOREfrom thee2e-testsCircleCI contextrun_maestro_e2e_testsshared Fastlane action for retry logicyesto Unity Hub install to auto-accept child module prompts (Hub 3.17.3 prompts interactively even in--headlessmode)sudo mkdir -p+chmod 777for the Unity license directory, matching game-ci/unity-orb's macOS approach (withoutsudo, the directory creation silently fails and the LicensingClient can't write the ULF file)Depends on #837