Skip to content

Add CircleCI job for maestro E2E tests#838

Draft
ajpallares wants to merge 54 commits into
add-maestro-e2e-testfrom
add-maestro-e2e-test-ci-job
Draft

Add CircleCI job for maestro E2E tests#838
ajpallares wants to merge 54 commits into
add-maestro-e2e-testfrom
add-maestro-e2e-test-ci-job

Conversation

@ajpallares
Copy link
Copy Markdown
Member

@ajpallares ajpallares commented Feb 27, 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
  • Uses run_maestro_e2e_tests shared Fastlane action for retry logic
  • Pipes yes to Unity Hub install to auto-accept child module prompts (Hub 3.17.3 prompts interactively even in --headless mode)
  • Uses sudo mkdir -p + chmod 777 for the Unity license directory, matching game-ci/unity-orb's macOS approach (without sudo, the directory creation silently fails and the LicensingClient can't write the ULF file)

Depends on #837

@ajpallares ajpallares added the pr:feat A new feature label Feb 27, 2026
@ajpallares ajpallares added pr:other Changes to our CI configuration files and scripts and removed pr:feat A new feature labels Feb 27, 2026
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 0330464 to 4758548 Compare March 25, 2026 16:25
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch 2 times, most recently from d63ba2b to a51924b Compare March 25, 2026 16:46
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 39ef1ec to 58e0f4c Compare March 25, 2026 17:09
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch 3 times, most recently from 1d7dd45 to 2b7a6e3 Compare March 30, 2026 08:33
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 5fe0ada to 54374aa Compare March 30, 2026 11:17
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch 3 times, most recently from 32fdb8c to 17b7c23 Compare March 30, 2026 11:45
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from ee1e465 to 10a37d7 Compare March 30, 2026 14:41
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 17b7c23 to b3bc307 Compare March 30, 2026 14:41
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from 10a37d7 to df2c385 Compare March 30, 2026 15:03
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from b3bc307 to 0aabd7a Compare March 30, 2026 15:03
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from df2c385 to dd86a57 Compare March 30, 2026 15:16
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 0aabd7a to 3978de4 Compare March 30, 2026 15:16
@ajpallares ajpallares changed the title feat: add CircleCI job for maestro E2E tests Add CircleCI job for maestro E2E tests Apr 6, 2026
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 2b8e38d to 14636ed Compare April 6, 2026 16:32
@ajpallares ajpallares force-pushed the add-maestro-e2e-test branch from dd86a57 to a5c35a8 Compare April 6, 2026 16:32
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from 371580e to f911bc5 Compare April 6, 2026 17:12
@ajpallares ajpallares force-pushed the add-maestro-e2e-test-ci-job branch from f911bc5 to 7ccb29f Compare April 6, 2026 17:28
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
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
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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:other Changes to our CI configuration files and scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant