@@ -14,16 +14,15 @@ concurrency:
1414 cancel-in-progress : true
1515
1616jobs :
17- integration -ios :
18- name : Integration Tests
17+ smoke -ios :
18+ name : Smoke Tests
1919 runs-on : macos-26
2020 timeout-minutes : 80
2121 continue-on-error : true
2222 env :
23- IOS_RUNTIME_VERSION : ' 26.2'
23+ IOS_RUNTIME_VERSION : " 26.2"
2424 AGENT_DEVICE_IOS_RUNNER_DERIVED_PATH : ${{ github.workspace }}/.tmp/ios-runner-derived
2525 AGENT_DEVICE_IOS_SIMCTL_LIST_TIMEOUT_MS : " 60000"
26- AGENT_DEVICE_DAEMON_TIMEOUT_MS : " 300000"
2726 AGENT_DEVICE_IOS_BOOT_TIMEOUT_MS : " 180000"
2827 AGENT_DEVICE_IOS_APP_LAUNCH_TIMEOUT_MS : " 60000"
2928 steps :
@@ -33,89 +32,36 @@ jobs:
3332 - name : Setup toolchain
3433 uses : ./.github/actions/setup-node-pnpm
3534
36- - name : Resolve Xcode cache key
37- id : xcode
38- run : |
39- set -euo pipefail
40- XCODE_VERSION="$(xcodebuild -version | tr '\n' ' ' | sed -E 's/[[:space:]]+/ /g; s/[[:space:]]$//')"
41- XCODE_KEY="$(echo "$XCODE_VERSION" | tr ' ' '-' | tr -cd '[:alnum:]._-')"
42- echo "key=$XCODE_KEY" >> "$GITHUB_OUTPUT"
43-
44- - name : Resolve prebuild source hash
45- id : source-hash
46- run : |
47- set -euo pipefail
48- echo "value=${{ hashFiles('ios-runner/**', 'package.json', 'pnpm-lock.yaml') }}" >> "$GITHUB_OUTPUT"
49-
50- - name : Cache iOS runner prebuilt
51- id : restore-prebuilt
52- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.3
35+ - name : Setup Apple replay
36+ id : apple-replay
37+ uses : ./.github/actions/setup-apple-replay
5338 with :
54- path : ${{ env.AGENT_DEVICE_IOS_RUNNER_DERIVED_PATH }}
55- key : ios-runner-prebuilt-${{ steps.xcode.outputs.key }}-ios-${{ env.IOS_RUNTIME_VERSION }}-${{ steps.source-hash.outputs.value }}
56-
57- - name : Resolve agent-device home
58- id : ios-agent-home
59- run : echo "dir=$HOME/.agent-device" >> "$GITHUB_OUTPUT"
39+ derived-path : ${{ env.AGENT_DEVICE_IOS_RUNNER_DERIVED_PATH }}
40+ cache-key-prefix : ios-runner-prebuilt
41+ cache-key-suffix : -ios-${{ env.IOS_RUNTIME_VERSION }}
42+ build-command : sh ./scripts/build-xcuitest-apple.sh
43+ xcuitest-platform : ios
44+ xcuitest-destination : platform=iOS Simulator,name=iPhone 17 Pro,OS=${{ env.IOS_RUNTIME_VERSION }}
45+ clean-derived : " 1"
6046
61- - name : Build iOS integration artifacts
62- if : steps.restore-prebuilt.outputs.cache-hit != 'true'
63- env :
64- AGENT_DEVICE_XCUITEST_PLATFORM : ios
65- AGENT_DEVICE_XCUITEST_DESTINATION : platform=iOS Simulator,name=iPhone 17 Pro,OS=${{ env.IOS_RUNTIME_VERSION }}
66- AGENT_DEVICE_IOS_CLEAN_DERIVED : ' 1'
67- run : |
68- sh ./scripts/build-xcuitest-apple.sh
69-
70- - name : Resolve and boot iOS test simulator
71- run : |
72- set -euo pipefail
73- RUNTIME_TOKEN="SimRuntime.iOS-${IOS_RUNTIME_VERSION//./-}"
74- export RUNTIME_TOKEN
75- UDID="$(
76- xcrun simctl list devices -j | node -e '
77- const fs = require("node:fs");
78- const runtimeToken = process.env.RUNTIME_TOKEN;
79- const payload = JSON.parse(fs.readFileSync(0, "utf8"));
80- const entries = Object.entries(payload.devices ?? {});
81- const iosRuntimes = entries.filter(([runtime]) => runtime.includes("SimRuntime.iOS-"));
82- const runtimeMatches = iosRuntimes.filter(([runtime]) => runtime.includes(runtimeToken));
83- const pool = runtimeMatches.length > 0 ? runtimeMatches : iosRuntimes;
84- const available = pool.flatMap(([runtime, devices]) =>
85- (devices ?? [])
86- .filter((device) => device.isAvailable)
87- .map((device) => ({ ...device, runtime })),
88- );
89- const preferred =
90- available.find((device) => device.state === "Booted" && device.name === "iPhone 17 Pro") ??
91- available.find((device) => device.name === "iPhone 17 Pro") ??
92- available.find((device) => device.state === "Booted") ??
93- available[0];
94- if (!preferred?.udid) process.exit(1);
95- process.stdout.write(preferred.udid);
96- '
97- )"
98- xcrun simctl shutdown all || true
99- xcrun simctl boot "$UDID" || true
100- xcrun simctl bootstatus "$UDID" -b
47+ - name : Boot iOS test simulator
48+ uses : ./.github/actions/boot-ios-test-simulator
49+ with :
50+ runtime-version : ${{ env.IOS_RUNTIME_VERSION }}
51+ preferred-device-name : iPhone 17 Pro
10152
102- - name : Run iOS simulator replay suite
103- run : node --experimental-strip-types src/bin.ts test test/integration/replays/ios/simulator --retries 3
53+ - name : Run iOS simulator smoke replay
54+ run : node --experimental-strip-types src/bin.ts test test/integration/replays/ios/simulator/01-settings.ad --retries 3 --report-junit test/artifacts/replays-ios-simulator-smoke.junit.xml
10455
105- - name : Run iOS physical device replay suite
56+ - name : Run iOS physical device smoke replay
10657 if : env.IOS_UDID != ''
10758 env :
10859 IOS_UDID : ${{ vars.IOS_UDID }}
109- run : node --experimental-strip-types src/bin.ts test test/integration/replays/ios/device --udid "$IOS_UDID" --retries 3
60+ run : node --experimental-strip-types src/bin.ts test test/integration/replays/ios/device/01-physical-lifecycle.ad --udid "$IOS_UDID" --retries 3 --report-junit test/artifacts/replays-ios-device-smoke.junit.xml
11061
11162 - name : Upload iOS artifacts
11263 if : always()
113- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
64+ uses : ./.github/ actions/upload-agent-device-artifacts
11465 with :
115- name : ios-artifacts
116- if-no-files-found : ignore
117- path : |
118- ${{ steps.ios-agent-home.outputs.dir }}/daemon.log
119- ${{ steps.ios-agent-home.outputs.dir }}/sessions/**
120- test/artifacts/**
121- test/screenshots/**
66+ artifact-name : ios-artifacts
67+ agent-home-dir : ${{ steps.apple-replay.outputs.agent-home-dir }}
0 commit comments