-
Notifications
You must be signed in to change notification settings - Fork 130
78 lines (67 loc) · 2.36 KB
/
ios.yml
File metadata and controls
78 lines (67 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: iOS
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
integration-ios:
name: Integration Tests
runs-on: macos-26
timeout-minutes: 80
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup toolchain
uses: ./.github/actions/setup-node-pnpm
- name: Resolve agent-device home
id: ios-agent-home
run: echo "dir=$HOME/.agent-device" >> "$GITHUB_OUTPUT"
- name: Select and start iOS simulator
run: |
UDID="$(
xcrun simctl list devices -j | node -e "
const fs = require('node:fs');
const payload = JSON.parse(fs.readFileSync(0, 'utf8'));
const all = Object.values(payload.devices ?? {}).flat();
const available = all.filter((d) => d.isAvailable);
const preferred =
available.find((d) => d.state === 'Booted') ??
available.find((d) => d.name === 'iPhone 17 Pro') ??
available[0];
if (!preferred?.udid) process.exit(1);
process.stdout.write(preferred.udid);
"
)"
xcrun simctl boot "$UDID" || true
echo "IOS_UDID=$UDID" >> "$GITHUB_ENV"
- name: Build iOS integration artifacts
run: pnpm build:xcuitest
- name: Boot preflight via agent-device
run: |
set -euo pipefail
node --experimental-strip-types src/bin.ts boot --platform ios --udid "$IOS_UDID" --json
env:
AGENT_DEVICE_IOS_BOOT_TIMEOUT_MS: "180000"
AGENT_DEVICE_RETRY_LOGS: "1"
- name: Run iOS integration test
env:
AGENT_DEVICE_DAEMON_TIMEOUT_MS: "300000"
run: node --test test/integration/ios.test.ts
- name: Upload iOS artifacts
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ios-artifacts
if-no-files-found: ignore
path: |
${{ steps.ios-agent-home.outputs.dir }}/daemon.log
${{ steps.ios-agent-home.outputs.dir }}/sessions/**
test/artifacts/**
test/screenshots/**