forked from appium/WebDriverAgent
-
Notifications
You must be signed in to change notification settings - Fork 1
119 lines (111 loc) · 3.97 KB
/
Copy pathfunctional-test.yml
File metadata and controls
119 lines (111 loc) · 3.97 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Functional Tests
# The e2e suite builds WDA from source and drives it through the JS module,
# so run it only when native sources or the JS runtime/tests change.
on:
pull_request:
paths:
- 'WebDriverAgentLib/**'
- 'WebDriverAgentRunner/**'
- 'WebDriverAgentTests/**'
- 'PrivateHeaders/**'
- 'Configurations/**'
- 'WebDriverAgent.xcodeproj/**'
- 'lib/**'
- 'test/**'
- 'Scripts/build-webdriveragent.mjs'
- 'package.json'
- 'tsconfig.json'
- '.github/workflows/functional-test.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
test_targets:
# iOS
- HOST_OS: 'xcode-27'
XCODE_VERSION: '27.0-beta'
PLATFORM_NAME: 'iOS'
PLATFORM_VERSION: '27.0'
DEVICE_NAME: 'iPhone 17'
- HOST_OS: 'macos-15'
XCODE_VERSION: '16.4'
PLATFORM_NAME: 'iOS'
PLATFORM_VERSION: '18.5'
DEVICE_NAME: 'iPhone 16 Plus'
# tvOS
- HOST_OS: 'xcode-27'
XCODE_VERSION: '27.0-beta'
PLATFORM_NAME: 'tvOS'
PLATFORM_VERSION: '27.0'
DEVICE_NAME: 'Apple TV 4K (3rd generation)'
- HOST_OS: 'macos-15'
XCODE_VERSION: '16.4'
PLATFORM_NAME: 'tvOS'
PLATFORM_VERSION: '18.5'
DEVICE_NAME: 'Apple TV 4K (3rd generation)'
# WatchOS
- HOST_OS: 'xcode-27'
XCODE_VERSION: '27.0-beta'
PLATFORM_NAME: 'watchOS'
PLATFORM_VERSION: '27.0'
DEVICE_NAME: 'Apple Watch Series 11 (46mm)'
- HOST_OS: 'macos-15'
XCODE_VERSION: '16.4'
PLATFORM_NAME: 'watchOS'
PLATFORM_VERSION: '11.5'
DEVICE_NAME: 'Apple Watch Series 10 (46mm)'
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
runs-on: ${{matrix.test_targets.HOST_OS}}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: lts/*
check-latest: true
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{matrix.test_targets.XCODE_VERSION}}
- run: |
npm install
mkdir -p ./Resources/WebDriverAgent.bundle
name: Install dev dependencies
- run: xcrun simctl list devices available
name: List Installed Simulators
- run: xcrun simctl list runtimes
name: List Runtimes
- name: Start Simulator UI
# Xcode 27 replaced Simulator.app with DeviceHub.app, one directory level up from
# Simulator.app's location (Contents/Applications instead of Contents/Developer/Applications).
run: |
if [ "${PLATFORM_VERSION%%.*}" -ge 27 ]; then
open -Fn "$(xcode-select --print-path)/../Applications/DeviceHub.app"
else
open -Fn "$(xcode-select --print-path)/Applications/Simulator.app"
fi
env:
PLATFORM_VERSION: ${{matrix.test_targets.PLATFORM_VERSION}}
- name: Prepare simulator
id: prepareSimulator
uses: futureware-tech/simulator-action@v5
with:
model: '${{matrix.test_targets.DEVICE_NAME}}'
os: '${{matrix.test_targets.PLATFORM_NAME}}'
os_version: '${{matrix.test_targets.PLATFORM_VERSION}}'
shutdown_after_job: false
wait_for_boot: true
- name: Finalize simulator boot
run: node Scripts/ci/wait-for-simulator-idle.mjs "${{steps.prepareSimulator.outputs.udid}}"
- run: npm run e2e-test
name: Run functional tests
env:
CI: true
_FORCE_LOGS: 1
_LOG_TIMESTAMP: 1
DEVICE_NAME: ${{matrix.test_targets.DEVICE_NAME}}
PLATFORM_NAME: ${{matrix.test_targets.PLATFORM_NAME}}
PLATFORM_VERSION: ${{matrix.test_targets.PLATFORM_VERSION}}
SIMULATOR_UDID: ${{steps.prepareSimulator.outputs.udid}}