Skip to content

Commit d6d9c4b

Browse files
ci: Use installed simulators for critical UI tests (#5015)
Stop creating simulators which can take around 5 minutes and use the already installed simulators on the GH action.
1 parent 1be08aa commit d6d9c4b

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/ui-tests-critical.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
path: TestSamples/SwiftUITestSample/DerivedData/Build/Products/Debug-iphonesimulator/SwiftUITestSample.app
3535

3636
run-tests:
37-
name: Test iOS ${{matrix.os-version}} on ${{matrix.device}} Simulator
37+
name: Test iOS on Xcode ${{matrix.xcode}}
3838
needs: [build-sample]
3939
runs-on: ${{matrix.runs-on}}
4040
env:
@@ -51,23 +51,24 @@ jobs:
5151
fail-fast: false
5252
matrix:
5353
include:
54+
55+
# As of 25th March 2025, the preinstalled iOS simulator version is 16.4 for macOS 13 and Xcode 14.3.1; see
56+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-sdks
5457
- runs-on: macos-13
5558
xcode: "14.3.1"
5659
device: "iPhone 14"
57-
os-version: "16.4"
58-
force-sim-runtime: true
5960

6061
# macos-14 iOS 17 not included due to the XCUIServerNotFound errors causing flaky tests
6162

63+
# As of 25th March 2025, the preinstalled iOS simulator version is 18.2 for macOS 15 and Xcode 16.2; see
64+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md#installed-sdks
6265
- runs-on: macos-15
6366
xcode: "16.2"
6467
device: "iPhone 16"
65-
os-version: "18.2"
6668

6769
steps:
6870
- uses: actions/checkout@v4
69-
- name: Create ${{matrix.device}} (${{matrix.os-version}}) Simulator using Xcode ${{matrix.xcode}}
70-
run: ./scripts/create-simulator.sh "${{matrix.xcode}}" "${{matrix.os-version}}" "${{matrix.device}}" "${{matrix.force-sim-runtime}}"
71+
7172
- name: Install tooling
7273
run: make init-ci-test
7374

@@ -76,21 +77,21 @@ jobs:
7677
name: ${{env.APP_ARTIFACT_NAME}}
7778
path: ${{env.APP_PATH}}
7879

80+
- name: Boot Simulator
81+
run: xcrun simctl boot "${{matrix.device}}"
82+
83+
- name: Install App
84+
run: xcrun simctl install booted ${{env.APP_PATH}}
85+
7986
- name: Run Maestro Flows
8087
run: |
81-
xcrun simctl install booted ${{env.APP_PATH}}
82-
8388
maestro test ${{env.MAESTRO_FLOWS_PATH}} --format junit --debug-output ${{env.MAESTRO_LOGS_PATH}}
8489
85-
- name: Delete Simulator
86-
if: always()
87-
run: ./scripts/delete-simulator.sh
88-
8990
- name: Store Maestro Logs
9091
uses: actions/upload-artifact@v4
9192
if: failure()
9293
with:
93-
name: maestro-logs-${{matrix.device}}-${{matrix.os-version}}
94+
name: maestro-logs-${{matrix.xcode}}
9495
path: ${{env.MAESTRO_LOGS_PATH}}
9596

9697
- name: Archiving Crash Logs

0 commit comments

Comments
 (0)