Skip to content

Commit bf0e3d6

Browse files
committed
refactor: use official react-native-harness GitHub Action
1 parent 37d3798 commit bf0e3d6

1 file changed

Lines changed: 4 additions & 63 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ jobs:
212212
runs-on: macos-latest
213213
env:
214214
XCODE_VERSION: 16.4
215-
DEVICE_MODEL: iPhone 16 Pro
216-
IOS_VERSION: "18.6"
217215
steps:
218216
- name: Checkout
219217
uses: actions/checkout@v4
@@ -252,69 +250,12 @@ jobs:
252250
-scheme RiveExample \
253251
-sdk iphonesimulator \
254252
-configuration Debug \
255-
-destination 'platform=iOS Simulator,name=${{ env.DEVICE_MODEL }}' \
256253
build \
257254
CODE_SIGNING_ALLOWED=NO
258255
259-
- name: Setup iOS Simulator
260-
uses: futureware-tech/simulator-action@v4
261-
with:
262-
model: ${{ env.DEVICE_MODEL }}
263-
os: iOS
264-
os_version: ${{ env.IOS_VERSION }}
265-
wait_for_boot: true
266-
267-
- name: Install app on simulator
268-
run: |
269-
xcrun simctl install booted example/ios/build/Build/Products/Debug-iphonesimulator/RiveExample.app
270-
271-
- name: Warmup - Start Metro and launch app once
272-
run: |
273-
cd example
274-
yarn start &
275-
METRO_PID=$!
276-
sleep 10
277-
echo "Launching app to warm up..."
278-
xcrun simctl launch booted rive.example
279-
sleep 5
280-
xcrun simctl terminate booted rive.example || true
281-
kill $METRO_PID || true
282-
283256
- name: Run harness tests on iOS
284-
timeout-minutes: 10
285-
run: |
286-
cd example
287-
# Start log streaming in background
288-
xcrun simctl spawn booted log stream --level=debug --predicate 'processImagePath CONTAINS "RiveExample" OR subsystem CONTAINS "rive"' > ../simulator.log 2>&1 &
289-
LOG_PID=$!
290-
291-
# Run harness tests
292-
yarn test:harness:ios || TEST_RESULT=$?
293-
294-
# Stop log streaming
295-
kill $LOG_PID 2>/dev/null || true
296-
297-
# Exit with test result
298-
exit ${TEST_RESULT:-0}
299-
300-
- name: Capture logs on failure
301-
if: failure()
302-
run: |
303-
echo "=== Simulator Stream Log ==="
304-
cat simulator.log 2>/dev/null | tail -500 || echo "No stream log found"
305-
306-
echo ""
307-
echo "=== Crash Reports ==="
308-
find ~/Library/Logs/DiagnosticReports -name "*RiveExample*" -mmin -10 -exec cat {} \; 2>/dev/null || echo "No crash reports found"
309-
310-
echo ""
311-
echo "=== System Log (broader filter) ==="
312-
xcrun simctl spawn booted log show --last 5m --predicate 'processImagePath CONTAINS "RiveExample" OR message CONTAINS "rive" OR message CONTAINS "harness"' 2>/dev/null | tail -200 || echo "No logs found"
313-
314-
- name: Upload logs
315-
if: failure()
316-
uses: actions/upload-artifact@v4
257+
uses: callstackincubator/react-native-harness/actions/ios@main
317258
with:
318-
name: harness-logs
319-
path: |
320-
simulator.log
259+
app: example/ios/build/Build/Products/Debug-iphonesimulator/RiveExample.app
260+
runner: ios
261+
projectRoot: example

0 commit comments

Comments
 (0)