Skip to content

Commit ba73ab0

Browse files
Test 41 of CI
1 parent c425d95 commit ba73ab0

File tree

1 file changed

+29
-41
lines changed

1 file changed

+29
-41
lines changed

.github/workflows/ios-simulator-tests.yml

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,12 @@ on:
99
# - master
1010

1111
jobs:
12-
setup-simulator:
13-
name: Setup iOS Simulator
12+
create-simulator:
13+
name: Create iOS Simulator
1414
runs-on: macos-15
1515
outputs:
1616
simulator-udid: ${{ steps.create-simulator.outputs.udid }}
1717
steps:
18-
- name: Checkout repository
19-
uses: actions/checkout@v3
20-
21-
# - name: List available simulator runtimes
22-
# run: xcrun simctl list runtimes
23-
2418
- name: Create iOS Simulator
2519
id: create-simulator
2620
run: |
@@ -33,12 +27,9 @@ jobs:
3327
echo "✅ Simulator created (uuid: '$UDID')"
3428
echo "udid=$UDID" >> $GITHUB_OUTPUT
3529
36-
echo "🛠️ Booting simulator: $SIMULATOR_NAME ($UDID)"
37-
xcrun simctl boot "$UDID"
38-
echo "✅ Simulator booted."
39-
4030
- name: Set Simulator Language and Locale
4131
run: |
32+
echo
4233
UDID="${{ steps.create-simulator.outputs.udid }}"
4334
LANGUAGE="en"
4435
LOCALE="en_US"
@@ -56,30 +47,30 @@ jobs:
5647
5748
echo "✅ Simulator language set."
5849
59-
build-and-setup-server:
60-
name: Build App and Setup Server
50+
boot-simulator:
51+
name: Boot iOS Simulator
6152
runs-on: macos-15
62-
# needs: setup-simulator
53+
needs: create-simulator
6354
steps:
6455
- name: Checkout repository
6556
uses: actions/checkout@v3
6657

67-
# - name: Setup pnpm
68-
# uses: pnpm/action-setup@v2
69-
# with:
70-
# version: latest
71-
72-
# - name: Setup Node.js
73-
# uses: actions/setup-node@v4
74-
# with:
75-
# node-version: "22"
76-
# cache: "pnpm"
58+
# - name: List available simulator runtimes
59+
# run: xcrun simctl list runtimes
7760

78-
# - name: Install dependencies
79-
# run: pnpm install
61+
- name: Boot iOS Simulator
62+
run: |
63+
echo "🛠️ Booting simulator: $SIMULATOR_NAME ($UDID)"
64+
xcrun simctl boot "$UDID"
65+
echo "✅ Simulator booted."
8066
81-
# - name: Build the project
82-
# run: pnpm run build
67+
build-and-setup-server:
68+
name: Build App and Setup Server
69+
runs-on: macos-15
70+
needs: create-simulator
71+
steps:
72+
- name: Checkout repository
73+
uses: actions/checkout@v3
8374

8475
- name: Check Version of Xcodebuild
8576
run: xcodebuild -version
@@ -119,7 +110,7 @@ jobs:
119110
run-tests:
120111
name: Run iOS Simulator Tests
121112
runs-on: macos-15
122-
needs: [setup-simulator, build-and-setup-server]
113+
needs: [boot-simulator, build-and-setup-server]
123114
steps:
124115
- name: Checkout repository
125116
uses: actions/checkout@v3
@@ -156,7 +147,7 @@ jobs:
156147
- name: Run End-to-End iOS Simulator Tests
157148
env:
158149
APNS_TOKEN_KEY: ${{ secrets.APNS_TOKEN_KEY }}
159-
CI_SIMULATOR_UDID: ${{ needs.setup-simulator.outputs.simulator-udid }}
150+
# CI_SIMULATOR_UDID: ${{ needs.boot-simulator.outputs.simulator-udid }}
160151
CI_SKIP_SIMULATOR_SETUP: "true"
161152
run: pnpm run test
162153

@@ -171,7 +162,6 @@ jobs:
171162
# run: |
172163
# echo "Test failed. Retrieving logs..."
173164
# xcrun xcresulttool get test-results tests --path /Users/runner/work/hapns/hapns/TestSlowness.xcresult --format json | jq .
174-
175165
# - name: Retrieve and Print Test Logs on Failure (2/2)
176166
# if: failure()
177167
# run: |
@@ -184,7 +174,6 @@ jobs:
184174
# else
185175
# echo "Could not find .xcresult bundle."
186176
# fi
187-
188177
# - name: Verify app entitlements
189178
# if: failure()
190179
# env:
@@ -199,7 +188,6 @@ jobs:
199188
# else
200189
# echo "Could not find .app bundle to verify entitlements."
201190
# fi
202-
203191
- name: Cleanup
204192
if: always()
205193
run: |
@@ -210,10 +198,10 @@ jobs:
210198
rm server.pid
211199
fi
212200
213-
# Clean up simulator if we created it
214-
SIMULATOR_UDID="${{ needs.setup-simulator.outputs.simulator-udid }}"
215-
if [ -n "$SIMULATOR_UDID" ]; then
216-
echo "🛠️ Deleting simulator: $SIMULATOR_UDID"
217-
xcrun simctl delete "$SIMULATOR_UDID" || true
218-
echo "✅ Simulator deleted."
219-
fi
201+
# # Clean up simulator if we created it
202+
# SIMULATOR_UDID="${{ needs.setup-simulator.outputs.simulator-udid }}"
203+
# if [ -n "$SIMULATOR_UDID" ]; then
204+
# echo "🛠️ Deleting simulator: $SIMULATOR_UDID"
205+
# xcrun simctl delete "$SIMULATOR_UDID" || true
206+
# echo "✅ Simulator deleted."
207+
# fi

0 commit comments

Comments
 (0)