-
-
Notifications
You must be signed in to change notification settings - Fork 25
91 lines (75 loc) · 2.66 KB
/
appium3_ios.yml
File metadata and controls
91 lines (75 loc) · 2.66 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
79
80
81
82
83
84
85
86
87
88
89
90
91
name: iOS WDIO Tests with Appium 3
on:
pull_request:
env:
CI: true
SHOW_XCODE_LOG: true
PREBUILT_WDA_PATH: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app
jobs:
wdio_ios:
runs-on: macos-26
name: WDIO iOS (Xcode 16.4)
steps:
- uses: actions/checkout@v4
- name: Install Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: '22.x'
- name: Select Xcode 16.4
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.4'
- name: List Installed Simulators
run: xcrun simctl list devices available
- name: Install jq
run: brew install jq
- run: |
version=$(grep 'appium_flutter_server:' README.md | awk '{print $2}')
ios_app="https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/$version/ios.zip"
echo "Downloading from: $ios_app"
curl -LO "$ios_app"
echo "APP_PATH=$(pwd)/ios.zip" >> $GITHUB_ENV
name: Download sample iOS app
- name: Start iOS Simulator UI
run: open -Fn "$(xcode-select --print-path)/Applications/Simulator.app"
- name: Boot simulator
id: prepareSimulator
uses: futureware-tech/simulator-action@v4
with:
model: 'iPhone 16'
os_version: '18.5'
shutdown_after_job: false
wait_for_boot: true
- run: |
target_sim_id=$(xcrun simctl list devices available | grep -A 10 "Booted" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
echo "Target sim id: $target_sim_id"
echo "udid=$target_sim_id" >> $GITHUB_ENV
- run: |
npm install -g appium
npm install --no-package-lock
npm run build-flutter-by-service
npm run build
name: Install Appium and deps
- run: |
appium driver list
appium driver doctor xcuitest
appium driver run xcuitest download-wda-sim --platform=ios --outdir=$(dirname "$PREBUILT_WDA_PATH")
echo "WDA path: $PREBUILT_WDA_PATH"
echo "WDA_PATH=$PREBUILT_WDA_PATH" >> $GITHUB_ENV
name: Build WDA with XCUITest driver
- run: |
echo "UDID: $udid"
echo "WDA path: $PREBUILT_WDA_PATH"
xcrun simctl install $udid $PREBUILT_WDA_PATH
xcrun simctl launch $udid "com.facebook.WebDriverAgentRunner.xctrunner"
name: Install and launch WDA on Simulator
- run: |
mkdir -p appium-logs
UDID=$udid APP_PATH=$APP_PATH npm run wdio-ios | tee appium-logs/logs.txt
name: Run WDIO iOS
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: appium-logs
path: appium-logs