diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index f9d5be61e8743..215d906c6663e 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -275,14 +275,26 @@ jobs: ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c pod install --verbose working-directory: ${{ github.workspace }}/js/react_native/e2e/ios - - name: Build and Run Detox iOS e2e Tests + - name: Build Detox iOS e2e Tests + run: detox build --configuration ios.sim.release + working-directory: ${{ github.workspace }}/js/react_native/e2e + + - name: Reset iOS Simulators before Detox + run: | + set -e -x + xcrun simctl shutdown all || true + xcrun simctl erase all || true + killall Simulator || true + killall com.apple.CoreSimulator.CoreSimulatorService || true + + - name: Run Detox iOS e2e Tests run: | - detox build --configuration ios.sim.release JEST_JUNIT_OUTPUT_FILE=${{ github.workspace }}/js/react_native/e2e/ios-test-results.xml \ detox test --record-logs all \ --configuration ios.sim.release \ --loglevel verbose \ - --take-screenshots failing + --take-screenshots failing \ + --cleanup working-directory: ${{ github.workspace }}/js/react_native/e2e - name: Upload iOS Test Results