File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Any command here that exits non-zero is an error
4+ set -e
5+
6+ # Get our simulator name from our test Detox config
7+ pushd " $( dirname " $0 " ) /../../../tests" || exit 1
8+ SIM=" $( cat .detoxrc.js | grep iPhone | cut -d" '" -f2) "
9+ echo " Attempting to boot iOS Simulator $SIM ..."
10+
11+ # Boot the simulator if not booted, make sure it is in the foreground
12+ (xcrun simctl boot " $SIM " || true) && open -a Simulator.app
13+
14+ # Is it booted?
15+ xcrun simctl list | grep -i ' iPhone 16 (' | grep -v ' Phone:' | grep -v ' unavailable' | grep -v CoreSimulator| grep Booted
16+
17+ # Are we a Debug or Release build?
18+ BUILDDIR=" $( ls -1 ios/build/Build/Products/) "
19+
20+ # Install our app (glob so Release or Debug works)
21+ xcrun simctl install ' iPhone 16' " ios/build/Build/Products/$BUILDDIR /testing.app"
Original file line number Diff line number Diff line change 44 workflow_dispatch :
55 inputs :
66 iterations :
7- description : " Number of iterations to run. Default 1. Max 122."
7+ description : ' Number of iterations to run. Default 1. Max 122.'
88 required : true
99 default : 1
1010 type : number
@@ -282,6 +282,11 @@ jobs:
282282 continue-on-error : true
283283 run : nohup sh -c "sleep 110 && xcrun simctl spawn booted log stream --level debug --style compact > simulator.log 2>&1 &"
284284
285+ - name : Pre-Boot Simulator
286+ # The goal here is to separate Simulator boot from Detox run,
287+ # So that Simulator boot issues we seem to have may be handled separately
288+ run : ./.github/workflows/scripts/boot-simulator.sh
289+
285290 - name : Detox Test
286291 if : contains(matrix.buildmode, 'debug')
287292 timeout-minutes : 50
You can’t perform that action at this time.
0 commit comments