fix(ci): wait for iOS simulator before running screenshot tests#130
Merged
Conversation
Pre-boot the simulator and warm xcodebuild build settings cache before fastlane starts, preventing flaky xcodebuild -showBuildSettings timeouts on hosted runners. Also guard against nil result from run_tests when the build settings resolution fails despite fail_build: false.
📲 Install BuildsiOS
|
When run_tests returns nil (e.g. xcodebuild -showBuildSettings timeout with fail_build: false), the previous fallback to 0 caused the retry loop to exit immediately as if tests passed. Now correctly treats nil as a failure so the simulator reboot and retry logic kicks in.
The macOS 26 runner has multiple iOS simulator runtimes installed. Three independent resolution mechanisms (simctl list, scan detect_values, xcodebuild destination) each picked a different "iPhone 17 Pro" UDID, causing the status bar override and app uninstall to target the wrong simulator. Now the wait-for-services-action resolves the UDID once, and it flows through to the lane for status bar, uninstall, destination, and retry. Replaces scan's reinstall_app with a direct simctl uninstall using the correct UDID, since scan resolves Scan.devices independently.
Empty strings are truthy in Ruby, so an unset or blank simulator_udid from the workflow would skip the fallback boot logic and pass an empty UDID to simctl/xcodebuild.
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
kula-app/wait-for-services-action/ios-simulator@v1step before screenshot tests to pre-boot the simulator and warm thexcodebuild -showBuildSettingscache, preventing flaky timeouts on hosted runnersscreenshots.rbwhererun_testsreturningnil(due to build settings timeout withfail_build: false) caused aNoMethodErrorcrashContext
3 of 4 screenshot jobs in run #26826536926 failed because
xcodebuild -showBuildSettingstimed out on all 4 retry attempts (3s, 6s, 12s, 24s) before the tests even started. The simulator was booted by the fastlane lane, but the Xcode build system wasn't warmed up yet on the freshly provisioned macOS runner.Test plan