Skip to content

Split the iOS E2E template-app workflow and harden the Maestro runner - #58484

Open
jwajgelt wants to merge 6 commits into
react:mainfrom
software-mansion-labs:jwajgelt/e2e-split-build-test-upstream
Open

Split the iOS E2E template-app workflow and harden the Maestro runner#58484
jwajgelt wants to merge 6 commits into
react:mainfrom
software-mansion-labs:jwajgelt/e2e-split-build-test-upstream

Conversation

@jwajgelt

Copy link
Copy Markdown
Contributor

Summary:

This PR separates the template app's iOS build from its Maestro test run and updates the shared iOS runner:

  • Extract the existing template-app build steps into a build job. The project initialization, CocoaPods setup, and xcodebuild commands come from the previous combined test job; Prepare artifacts is renamed to Build the app.
  • Add a separate test job that depends on build and runs the Debug and Release apps. It repeats the checkout, Node, and Yarn setup from the old job and moves the existing Maestro execution and status reporting into this job. Both jobs keep macos-26-large.
  • Upload the built apps as artifacts and download them in the test job. Enable artifact replacement so the existing workflow retries can upload rebuilt apps under the same names.
  • Add Prepare project for Metro for Debug tests. Its package lookup, template-branch selection, and init-project-e2e.js invocation are copied from the existing Prepare artifacts step. The new job has a fresh filesystem, so it needs to recreate the JavaScript project for Metro; this step only repeats project initialization, leaving CocoaPods and the native build in the build job.
  • Update Maestro's app-path to point to the downloaded RNTestProject.app, replacing the path to the previous job's local Xcode build output.
  • Pass the selected simulator's UDID to app installation and video recording instead of using booted, so both target the same simulator as Maestro.
  • Make flow execution asynchronous and await the recorder's exit after sending SIGINT, so the video finishes writing and Node processes the child exit before the next flow starts. Send SIGKILL if the recorder has not exited within 30 seconds. (The missing wait predates this PR. Recordings were already uploaded as artifacts, but CI did not validate the videos, so recording problems could go unnoticed. #57749 introduced a separate recorder per flow, reusing the same filenames, which allows the next recording to start before the previous one finishes.)
  • Skip helpers/ when collecting flows, since these files are fragments included by other tests through runFlow.
  • Update unit tests to await flow execution and simulate recorder exit events. Add coverage for waiting on the recorder, skipping helpers, and reporting failure after all retries are exhausted.

Changelog:

[INTERNAL] [CHANGED] - Separate iOS template-app E2E builds from test execution and improve Maestro runner reliability.

Test Plan:

  • Author-reported E2E validation used macos-26 instead of the checked-in macos-26-large: RNTester passed 38/38 flows in both Debug and Release, and the template app passed in both configurations. These runs were not repeated during this review.
  • Runner unit tests with the repository's Jest configuration: 8/8 passedyarn jest .github/workflow-scripts/__tests__/maestro-ios-test.js.
  • node --check .github/workflow-scripts/maestro-ios.js — passed.
  • Prettier check on the updated unit tests and workflow — passed.
  • git diff --check — passed.
  • E2E with the local fixes and artifact replacement during a GitHub Actions retry were not run during this review.

kmagiera and others added 6 commits September 11, 2026 14:01
Build the app in a job of its own and hand it to the test job as an
artifact, as the RNTester E2E already does.
Address the simulator by explicit UDID rather than the 'booted' alias,
skip helper fragments that have no launchApp of their own, and await
the video recorder's exit so it is reaped rather than left as a zombie
per flow and the movie is fully written before the next flow starts.

Give the two ScrollView maintainVisibleContentPosition flows a 90s
scrollUntilVisible timeout: the example sits far down the list and
each scroll step serialises the whole accessibility tree.
The repository Jest setup fails any test that calls console.error, and
the runner logs one when a flow exhausts its retries — exactly the path
this test exercises. Silence it for this test only and assert the
message, so the guard still covers the rest of the suite.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 11, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Sep 11, 2026

@cipolleschi cipolleschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi thanks for working on this, but can I ask what's the rationale here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants