Skip to content

Commit 65bc6f1

Browse files
authored
chore(ci): harness CI timeout (#117)
## Summary Fixed harness CI tests that were timing out. **Root cause:** The official react-native-harness action and pnpm were causing issues where Metro wouldn't start properly or the harness couldn't connect to the app. **Solution:** - Use `yarn test:harness:ios` instead of `pnpm` or the official harness action - Boot the simulator manually before running tests - Install the app manually before running harness - Let the harness handle Metro startup and app launching ## Test plan - CI harness tests now pass consistently
1 parent a4fb24b commit 65bc6f1

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ jobs:
209209
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
210210
211211
test-harness-ios:
212-
if: false # TODO: re-enable once harness timeout issues are resolved
213212
runs-on: macos-latest
214213
env:
215214
XCODE_VERSION: 16.4
@@ -263,6 +262,30 @@ jobs:
263262
- name: Install app on simulator
264263
run: xcrun simctl install booted example/ios/build/Build/Products/Debug-iphonesimulator/RiveExample.app
265264

265+
- name: Wait for simulator to be fully ready
266+
run: |
267+
echo "Waiting for simulator to be fully ready..."
268+
sleep 10
269+
xcrun simctl list devices | grep Booted
270+
266271
- name: Run harness tests on iOS
267272
working-directory: example
268-
run: yarn test:harness:ios --debug --verbose --testTimeout 120000
273+
run: |
274+
# Retry up to 3 times due to flaky harness connection
275+
for attempt in 1 2 3; do
276+
echo "Attempt $attempt of 3"
277+
if yarn test:harness:ios --verbose --testTimeout 120000; then
278+
echo "Tests passed on attempt $attempt"
279+
exit 0
280+
fi
281+
echo "Attempt $attempt failed, retrying..."
282+
sleep 5
283+
done
284+
echo "All attempts failed"
285+
exit 1
286+
287+
- name: Debug - Check for console logs
288+
if: failure()
289+
run: |
290+
echo "=== Checking simulator logs for errors ==="
291+
xcrun simctl spawn booted log show --predicate 'processImagePath CONTAINS "RiveExample"' --last 5m --style compact 2>&1 | tail -200 || echo "No logs found"

0 commit comments

Comments
 (0)