Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/native-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,36 @@ jobs:
working-directory: packages/core/RNSentryCocoaTester
run: pod install

- name: List Available Simulators
run: xcrun simctl list devices available iPhone

- name: Run iOS Tests
working-directory: packages/core/RNSentryCocoaTester
env:
SCHEME: RNSentryCocoaTester
CONFIGURATION: Release
DESTINATION: 'platform=iOS Simulator,OS=latest,name=iPhone 16'
run: |
# Find first available iPhone simulator from latest iOS runtime
DEVICE_ID=$(xcrun simctl list devices available iPhone -j | jq -r '
.devices |
to_entries |
map(select(.key | startswith("com.apple.CoreSimulator.SimRuntime.iOS-"))) |
sort_by(.key) |
reverse |
.[0].value[] |
select(.isAvailable == true) |
.udid
' | head -1)
if [ -z "$DEVICE_ID" ]; then
echo "No iPhone simulators available"
exit 1
fi
echo "Using simulator: $DEVICE_ID"

env NSUnbufferedIO=YES \
xcodebuild -workspace *.xcworkspace \
-scheme $SCHEME -configuration $CONFIGURATION \
-destination "$DESTINATION" \
-destination "id=$DEVICE_ID" \
-quiet \
test

Expand Down
Loading