-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): re-enable Android E2E tests with BrowserStack Detox #44
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
tsdamas
wants to merge
14
commits into
main
Choose a base branch
from
SDKS-5053
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
e9dd59f
fix(ci): re-enable Android E2E tests with BrowserStack Detox cloud.3;…
tsdamas a4dfc61
fix(ci): add device-client and external-idp to Android codegen pre-step
tsdamas 97e9bc1
chore: trigger CI
tsdamas 8f3b5be
chore: trigger CI
tsdamas 652b712
triggering ci manually
tsdamas ee08aed
fix(ci): debug iOS simulator selection and exclude Android packaging …
tsdamas d892fd1
fix(ci): bump Xcode to 26.2 and scope Android Gradle assembly tasks
tsdamas be2385d
fix(ci): rollback xcode version on e2e and bump in unit
tsdamas 8cd5f8c
fix(ci): resolve xcode version
tsdamas ec71f49
fix(ci): replace simulator runtime gate with direct Xcode pin for Bro…
tsdamas eb75ebf
fix(ci): guard BrowserStack iOS Xcode selection on iphoneos SDK presence
tsdamas d1537cc
fix(ci): change pinned xcode version for e2e flow
tsdamas 7769d53
fix(ci): bump BrowserStack iOS result poller timeout and update sampl…
tsdamas b1e2a1c
chore(ci): remove manual trigger
tsdamas 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
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 |
|---|---|---|
|
|
@@ -83,40 +83,9 @@ jobs: | |
| working-directory: ${{ env.IOS_DIRECTORY }} | ||
| run: bundle exec pod install --repo-update | ||
|
|
||
| # Resolve Xcode: the pinned XCODE_VERSION may exist on the runner but lack the iOS simulator runtime | ||
| # component (SDK ≠ runtime — the SDK ships inside Xcode but the runtime is provisioned separately). | ||
| # This step prefers the pinned version but falls back to the newest installed Xcode whose major.minor | ||
| # iOS version has a matching pre-provisioned simulator runtime, so the destination is always bootable. | ||
| - name: Resolve Xcode version | ||
| run: | | ||
| PINNED="/Applications/Xcode_${{ env.XCODE_VERSION }}.app" | ||
| SELECTED="" | ||
| # Get all available iOS runtime versions (system-wide, not Xcode-scoped). | ||
| AVAILABLE_RUNTIMES=$(xcrun simctl list runtimes 2>/dev/null \ | ||
| | grep -i "iOS" | grep -v "unavailable" \ | ||
| | grep -oE "[0-9]+\.[0-9]+" | sort -u) | ||
| for app in "$PINNED" $(ls -d /Applications/Xcode*.app 2>/dev/null | sort -rV); do | ||
| [ -d "$app" ] || continue | ||
| # Derive the iOS SDK version this Xcode ships with (e.g. "26.1" from "iphonesimulator26.1"). | ||
| xcode_ios=$(DEVELOPER_DIR="$app/Contents/Developer" \ | ||
| xcodebuild -showsdks 2>/dev/null \ | ||
| | grep -i "iphonesimulator" | grep -oE "[0-9]+\.[0-9]+" | sort -rV | head -1) | ||
| [ -n "$xcode_ios" ] || continue | ||
| # Check if a runtime matching this Xcode's major.minor iOS version is provisioned. | ||
| if echo "$AVAILABLE_RUNTIMES" | grep -qx "$xcode_ios"; then | ||
| SELECTED="$app" | ||
| echo "XCODE_RESOLVED_PATH=$app" >> "$GITHUB_ENV" | ||
| echo "Resolved Xcode: $app (iOS SDK $xcode_ios, runtime available)" | ||
| break | ||
| else | ||
| echo "Skipping $app: iOS $xcode_ios SDK present but runtime not provisioned (available: $(echo $AVAILABLE_RUNTIMES | tr '\n' ' '))" | ||
| fi | ||
| done | ||
| [ -n "$SELECTED" ] || { echo "No Xcode with a matching provisioned iOS simulator runtime found"; exit 1; } | ||
|
|
||
| # Select Xcode version | ||
| - name: Select Xcode version | ||
| run: sudo xcode-select -s "${{ env.XCODE_RESOLVED_PATH }}" && /usr/bin/xcodebuild -version | ||
| run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app && /usr/bin/xcodebuild -version | ||
|
|
||
| # Clang module caches are sensitive to SDK header mtimes on the runner image. | ||
| # This must run AFTER Xcode is selected so the active SDK is finalised. | ||
|
|
@@ -136,32 +105,19 @@ jobs: | |
| chmod +x product/xcresultparser | ||
| sudo mv product/xcresultparser /usr/local/bin/ | ||
|
|
||
| # Resolve the best available iPhone simulator: prefer iPhone 17, fall back to any iPhone. | ||
| # Uses the device UDID as the destination to avoid OS version string mismatches between | ||
| # simctl runtime keys (e.g. "iOS-26-4") and xcodebuild's reported OS (e.g. "26.4.1"). | ||
| # Resolve a simulator for Xcode 26.4.1 using xcrun simctl. | ||
| # xcodebuild -showdestinations only returns placeholders on a fresh CI runner. | ||
| # Pick the first iPhone from the iOS 26.4 runtime (matches the active Xcode SDK). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason we are pinning to 26.4 and not have it more relaxed? |
||
| # Sets DESTINATION and SIMULATOR_UDID in GITHUB_ENV for all subsequent steps. | ||
| - name: Resolve simulator destination | ||
| run: | | ||
| DEVICES_JSON=$(xcrun simctl list devices available --json) | ||
| RESULT=$(echo "$DEVICES_JSON" | jq -r ' | ||
| [.devices | to_entries[] | ||
| | select(.key | test("iOS")) | ||
| | . as $runtime | ||
| | .value[] | ||
| | select(.name | test("^iPhone")) | ||
| | { | ||
| os: ($runtime.key | gsub("com.apple.CoreSimulator.SimRuntime.iOS-"; "") | gsub("-"; ".")), | ||
| name: .name, | ||
| udid: .udid | ||
| }] | ||
| | (map(select(.name == "iPhone 17")) | sort_by(.os) | last) | ||
| // (sort_by(.os) | last) | ||
| | "\(.name)|\(.os)|\(.udid)" | ||
| ') | ||
| SIMULATOR_NAME=$(echo "$RESULT" | cut -d'|' -f1) | ||
| OS_VERSION=$(echo "$RESULT" | cut -d'|' -f2) | ||
| SIMULATOR_UDID=$(echo "$RESULT" | cut -d'|' -f3) | ||
| echo "Resolved: $SIMULATOR_NAME ($OS_VERSION) [$SIMULATOR_UDID]" | ||
| echo "--- xcrun simctl list devices available ---" | ||
| xcrun simctl list devices available | ||
| echo "-------------------------------------------" | ||
| SIMULATOR_UDID=$(xcrun simctl list devices "iOS 26.4" available | grep "iPhone" | grep -oE '[A-F0-9-]{36}' | head -1) | ||
| [ -n "$SIMULATOR_UDID" ] || { echo "No eligible iPhone simulator found for iOS 26.4"; exit 1; } | ||
| SIMULATOR_NAME=$(xcrun simctl list devices "iOS 26.4" available | grep "$SIMULATOR_UDID" | sed 's/ *(.*//' | xargs) | ||
| echo "Resolved: ${SIMULATOR_NAME} (iOS 26.4) [${SIMULATOR_UDID}]" | ||
| echo "DESTINATION=platform=iOS Simulator,id=${SIMULATOR_UDID}" >> "$GITHUB_ENV" | ||
| echo "SIMULATOR_UDID=${SIMULATOR_UDID}" >> "$GITHUB_ENV" | ||
|
|
||
|
|
||
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
Binary file not shown.
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
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.
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.