-
-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(sim): Use custom scripts to manage simulators (#4484)
- Loading branch information
1 parent
2095ae0
commit b8ac050
Showing
4 changed files
with
48 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,9 +53,9 @@ jobs: | |
xcode: "14.3.1" | ||
device: "iPhone 14" | ||
os-version: "16.4" | ||
create-simulator: true | ||
force-sim-runtime: true | ||
|
||
# macos-14 iOS 17 not included due to the XCUIServerNotFound errors causing flaky tests | ||
# macos-14 iOS 17 not included due to the XCUIServerNotFound errors causing flaky tests | ||
|
||
- runs-on: macos-15 | ||
xcode: "16" | ||
|
@@ -65,8 +65,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create ${{matrix.device}} (${{matrix.os-version}}) Simulator using Xcode ${{matrix.xcode}} | ||
if: ${{matrix.create-simulator}} | ||
run: ./scripts/create-simulator.sh "${{matrix.xcode}}" "${{matrix.os-version}}" "${{matrix.device}}" | ||
run: ./scripts/create-simulator.sh "${{matrix.xcode}}" "${{matrix.os-version}}" "${{matrix.device}}" "${{matrix.force-sim-runtime}}" | ||
- name: Install Maestro | ||
run: brew tap mobile-dev-inc/tap && brew install mobile-dev-inc/tap/[email protected] | ||
- name: Install iDB Companion | ||
|
@@ -76,16 +75,17 @@ jobs: | |
with: | ||
name: ${{env.APP_ARTIFACT_NAME}} | ||
path: ${{env.APP_PATH}} | ||
- uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9 # pin@v3 | ||
with: | ||
model: ${{matrix.device}} | ||
os_version: ${{matrix.os-version}} | ||
|
||
- name: Run Maestro Flows | ||
run: | | ||
xcrun simctl install booted ${{env.APP_PATH}} | ||
maestro test ${{env.MAESTRO_FLOWS_PATH}} --format junit --debug-output ${{env.MAESTRO_LOGS_PATH}} | ||
- name: Delete Simulator | ||
if: always() | ||
run: ./scripts/delete-simulator.sh | ||
|
||
- name: Store Maestro Logs | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# SENTRY_SIMULATOR_UUID is set by create-simulator.sh | ||
if [ -z "${SENTRY_SIMULATOR_UUID}" ]; then | ||
echo "No simulator UUID provided" | ||
exit 0 | ||
fi | ||
|
||
uuid="${SENTRY_SIMULATOR_UUID}" | ||
|
||
xcrun simctl shutdown "${uuid}" | ||
echo "Shutdown simulator with UUID ${uuid}" | ||
|
||
xcrun simctl delete "${uuid}" | ||
echo "Deleted simulator with UUID ${uuid}" |