Skip to content

Commit 40439ab

Browse files
antonisclaude
andcommitted
fix(ci): Move iOS warmup steps to test-ios job
The iOS simulator readiness and Maestro warm-up steps were incorrectly placed in the test-android job from a merge conflict resolution. They had conditions referencing matrix.platform which doesn't exist in that job, so they never ran. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 30f1780 commit 40439ab

1 file changed

Lines changed: 29 additions & 48 deletions

File tree

.github/workflows/sample-application.yml

Lines changed: 29 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,35 @@ jobs:
337337
with:
338338
model: ${{ env.IOS_DEVICE }}
339339
os_version: ${{ env.IOS_VERSION }}
340+
wait_for_boot: true
341+
erase_before_boot: false
342+
343+
- name: Wait for iOS simulator to be fully ready
344+
run: |
345+
xcrun simctl bootstatus booted -b
346+
xcrun simctl launch booted com.apple.Preferences
347+
sleep 5
348+
xcrun simctl terminate booted com.apple.Preferences
349+
350+
- name: Warm up Maestro driver on iOS
351+
continue-on-error: true
352+
working-directory: ${{ env.REACT_NATIVE_SAMPLE_PATH }}
353+
run: |
354+
xcrun simctl install booted sentryreactnativesample.app
355+
WARMUP=$(mktemp /tmp/maestro-warmup-XXXXXX.yml)
356+
cat > "$WARMUP" << 'YML'
357+
appId: io.sentry.reactnative.sample
358+
---
359+
- launchApp:
360+
clearState: true
361+
- extendedWaitUntil:
362+
visible: "Sentry React Native Sample"
363+
timeout: 120000
364+
- killApp
365+
YML
366+
sed -i '' 's/^ //' "$WARMUP"
367+
maestro test "$WARMUP" || true
368+
rm -f "$WARMUP"
340369
341370
- name: Run iOS Tests
342371
working-directory: ${{ env.REACT_NATIVE_SAMPLE_PATH }}
@@ -398,54 +427,6 @@ jobs:
398427
sudo udevadm control --reload-rules
399428
sudo udevadm trigger --name-match=kvm
400429
401-
- name: Boot ${{ env.IOS_DEVICE }} with iOS ${{ env.IOS_VERSION }}
402-
uses: futureware-tech/simulator-action@e89aa8f93d3aec35083ff49d2854d07f7186f7f5 # pin@v5
403-
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
404-
with:
405-
model: ${{ env.IOS_DEVICE }}
406-
os_version: ${{ env.IOS_VERSION }}
407-
wait_for_boot: true
408-
erase_before_boot: false
409-
410-
- name: Wait for iOS simulator to be fully ready
411-
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
412-
run: |
413-
xcrun simctl bootstatus booted -b
414-
xcrun simctl launch booted com.apple.Preferences
415-
sleep 5
416-
xcrun simctl terminate booted com.apple.Preferences
417-
418-
- name: Warm up Maestro driver on iOS
419-
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
420-
continue-on-error: true
421-
working-directory: ${{ env.REACT_NATIVE_SAMPLE_PATH }}
422-
run: |
423-
# Install the app first so Maestro can launch it
424-
xcrun simctl install booted sentryreactnativesample.app
425-
# The first Maestro launchApp after simulator boot can fail on
426-
# Cirrus Labs Tart VMs. Run a throwaway launch cycle to warm up
427-
# the IDB/XCUITest driver before real tests start.
428-
WARMUP=$(mktemp /tmp/maestro-warmup-XXXXXX.yml)
429-
cat > "$WARMUP" << 'YML'
430-
appId: io.sentry.reactnative.sample
431-
---
432-
- launchApp:
433-
clearState: true
434-
- extendedWaitUntil:
435-
visible: "Sentry React Native Sample"
436-
timeout: 120000
437-
- killApp
438-
YML
439-
# Strip leading whitespace from heredoc (indented for readability)
440-
sed -i '' 's/^ //' "$WARMUP"
441-
maestro test "$WARMUP" || true
442-
rm -f "$WARMUP"
443-
444-
- name: Run iOS Tests
445-
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
446-
working-directory: ${{ env.REACT_NATIVE_SAMPLE_PATH }}
447-
run: yarn test-ios
448-
449430
- name: Run Android Tests on API ${{ env.ANDROID_API_LEVEL }}
450431
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # pin@v2.37.0
451432
with:

0 commit comments

Comments
 (0)