-
Notifications
You must be signed in to change notification settings - Fork 474
test(e2e): shard maestro flows across two devices per job #9732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wobsoriano
wants to merge
14
commits into
main
Choose a base branch
from
rob/maestro-ci-hardening
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1c17de6
test(expo): keep maestro reports and debug output from every run
wobsoriano ed98ed3
ci(e2e): split the maestro flows across two devices per job
wobsoriano 68b599c
test(expo): fold the restart check into the sign-in flow
wobsoriano 449dc3e
ci(e2e): fail the maestro run on any first-attempt flow failure
wobsoriano f2b735b
test(expo): report the sign-out outcome in the fixture
wobsoriano 3b53ebb
ci(e2e): bound the iOS simulator boot wait
wobsoriano 9fad5c0
chore: reduce comments
wobsoriano 6805299
ci(e2e): boot the iOS simulators after the native build
wobsoriano 4664b8a
chore(e2e): trim comments to the non-obvious
wobsoriano bfd33e8
test(expo): retry a launch that dies before the app renders
wobsoriano 1dcb1a6
ci(e2e): gate the artifact upload on the scrub and restore the local …
wobsoriano 7682e6d
ci(e2e): bump maestro to 2.10.0
wobsoriano 7025b9d
ci(e2e): shorten the expo workflow and job names
wobsoriano 87fdd91
Merge branch 'main' into rob/maestro-ci-hardening
wobsoriano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| #!/usr/bin/env bash | ||
| # Usage: ./boot-ios-simulators.sh boot <count> [model] | wait | ||
| set -euo pipefail | ||
|
|
||
| boot() { | ||
| local count=$1 model=${2:-iPhone 17 Pro} | ||
| local runtime device_type udids=() i | ||
| # pinned to the SDK the app was built with; runners may also carry a newer beta runtime | ||
| sdk=$(xcrun --sdk iphonesimulator --show-sdk-version) | ||
| runtime=$(xcrun simctl list runtimes available -j | jq -r --arg v "$sdk" \ | ||
| '[.runtimes[] | select(.platform == "iOS")] | (map(select(.version == $v)) + .) | first | .identifier') | ||
| device_type=$(xcrun simctl list devicetypes -j | jq -r --arg m "$model" '.devicetypes[] | select(.name == $m) | .identifier') | ||
| for i in $(seq 1 "$count"); do | ||
| udids+=("$(xcrun simctl create "$model $i" "$device_type" "$runtime")") | ||
| xcrun simctl boot "${udids[$((i - 1))]}" | ||
| done | ||
| MAESTRO_UDID=$(IFS=,; echo "${udids[*]}") | ||
| echo "Booting $count x $model on $runtime: $MAESTRO_UDID" | ||
| if [ -n "${GITHUB_ENV:-}" ]; then echo "MAESTRO_UDID=$MAESTRO_UDID" >> "$GITHUB_ENV"; fi | ||
| } | ||
|
|
||
| wait_ready() { | ||
| local udid key | ||
| IFS=, read -r -a udids <<< "${MAESTRO_UDID:?MAESTRO_UDID is required}" | ||
| for udid in "${udids[@]}"; do | ||
| xcrun simctl bootstatus "$udid" -b & | ||
| local pid=$! elapsed=0 | ||
| while kill -0 "$pid" 2>/dev/null; do | ||
| if [ "$elapsed" -ge 240 ]; then | ||
| kill "$pid" 2>/dev/null || true | ||
| wait "$pid" 2>/dev/null || true | ||
| echo "::error::$udid did not finish booting within ${elapsed}s" | ||
| xcrun simctl list devices -j | jq -r --arg u "$udid" '.devices[][] | select(.udid == $u) | "\(.name): \(.state)"' | ||
| return 1 | ||
| fi | ||
| sleep 5 | ||
| elapsed=$((elapsed + 5)) | ||
| done | ||
| wait "$pid" | ||
| xcrun simctl spawn "$udid" defaults write com.apple.UIKit UIAnimationDragCoefficient -float 0.01 || true | ||
| xcrun simctl spawn "$udid" defaults write -g ApplePersistenceIgnoreState -bool YES || true | ||
| xcrun simctl spawn "$udid" defaults write com.apple.keyboard.ContinuousPath -bool NO || true | ||
| xcrun simctl spawn "$udid" defaults write com.apple.keyboard.AutoCapitalization -bool NO || true | ||
| xcrun simctl spawn "$udid" defaults write com.apple.keyboard.AutoCorrection -bool NO || true | ||
| xcrun simctl spawn "$udid" defaults write com.apple.keyboard.Prediction -bool NO || true | ||
| # the keyboard tutorial sheets have their own Continue button that steals taps | ||
| for key in DidShowContinuousPathIntroduction DidShowGestureKeyboardIntroduction KeyboardDidShowProductivityTutorial UIKeyboardDidShowInternationalInfoIntroduction; do | ||
| xcrun simctl spawn "$udid" defaults write com.apple.keyboard.preferences "$key" -bool YES || true | ||
| done | ||
| done | ||
| } | ||
|
|
||
| case "${1:-}" in | ||
| boot) boot "${2:?count is required}" "${3:-}" ;; | ||
| wait) wait_ready ;; | ||
| *) echo "usage: $0 boot <count> [model] | wait" >&2; exit 2 ;; | ||
| esac |
22 changes: 0 additions & 22 deletions
22
integration/tests/expo-native/flows/session-persists-across-restart.yaml
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,19 @@ | ||
| # Native AuthView email+password sign-in, asserting the native->JS session | ||
| # sync, then JS-side sign-out asserting the reverse direction. | ||
| # Native sign-in observed by JS, kept across a restart without clearing state, then JS sign-out. | ||
| appId: com.clerk.exponativebuildfixture | ||
| name: Native AuthView sign-in syncs to JS | ||
| name: Native AuthView sign-in syncs to JS and survives a restart | ||
| --- | ||
| - runFlow: subflows/open-app.yaml | ||
| - tapOn: | ||
| id: 'open-auth-view-button' | ||
| - runFlow: subflows/sign-in-email-password.yaml | ||
| - runFlow: subflows/assert-signed-in.yaml | ||
| - stopApp | ||
| - launchApp | ||
| - extendedWaitUntil: | ||
| visible: 'signed in' | ||
| timeout: 45000 | ||
| - assertVisible: | ||
| id: 'user-id' | ||
| - tapOn: | ||
| id: 'sign-out-button' | ||
| - runFlow: subflows/assert-signed-out.yaml |
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
18 changes: 11 additions & 7 deletions
18
integration/tests/expo-native/flows/subflows/open-app.yaml
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.