Skip to content

Commit 48e9034

Browse files
committed
Use booted simulator
1 parent a40e8db commit 48e9034

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,6 @@ jobs:
151151
with:
152152
key: ${{ github.job }}-${{ runner.os }}
153153
- run: rustup target add aarch64-apple-ios-sim
154-
# The following makes subsequent "open -a Simulator" calls work
155-
- name: Invoke the simulator
156-
run: open -a ${{ env.DEVELOPER_DIR }}/Contents/Developer/Applications/Simulator.app
157-
- name: Boot the simulator
158-
run: |
159-
xcrun simctl boot '${{ env.IOS_DEVICE_NAME }}'
160-
SIMULATOR_UDID=`xcrun simctl list devices booted --json | jq -r '.devices[][] | select(.name == "${{ env.IOS_DEVICE_NAME }}").udid'`
161-
echo "Simulator booted with UDID = $SIMULATOR_UDID"
162-
echo "SIMULATOR_UDID=$SIMULATOR_UDID" >> $GITHUB_ENV
163154
- run: npm ci
164155
- run: npm run bootstrap
165156
env:
@@ -185,9 +176,9 @@ jobs:
185176
- name: Run test app
186177
run: |
187178
# Install the app
188-
xcrun simctl install $SIMULATOR_UDID ./ios/build/test-app.xcarchive/Products/Applications/ReactTestApp.app
179+
xcrun simctl install booted ./ios/build/test-app.xcarchive/Products/Applications/ReactTestApp.app
189180
# Run Mocha Remote wrapping the launch of the app
190-
npx mocha-remote --exit-on-error -- xcrun simctl launch --terminate-running-process --console-pty $SIMULATOR_UDID com.microsoft.ReactTestApp
181+
npx mocha-remote --exit-on-error -- xcrun simctl launch --terminate-running-process --console-pty booted com.microsoft.ReactTestApp
191182
working-directory: apps/test-app
192183
env:
193184
MOCHA_REMOTE_CONTEXT: allTests

0 commit comments

Comments
 (0)