Skip to content

Commit 646f045

Browse files
committed
ci: use prebuilt wda
1 parent ee92823 commit 646f045

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/functional-test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,32 @@ jobs:
2020
test_targets:
2121
- target: test/functional/ios/driver_test.rb,test/functional/ios/patch_test.rb
2222
name: test1
23+
platform: ios
24+
wdaName: WebDriverAgentRunner-Runner.app
2325
- target: test/functional/ios/webdriver/create_session_test.rb,test/functional/ios/webdriver/w3c_actions_test.rb
2426
name: test2
27+
platform: ios
28+
wdaName: WebDriverAgentRunner-Runner.app
2529
- target: test/functional/ios/webdriver/device_test.rb
2630
name: test3
31+
platform: ios
32+
wdaName: WebDriverAgentRunner-Runner.app
2733
- target: test/functional/ios/ios/device_test.rb
2834
name: test4
35+
platform: ios
36+
wdaName: WebDriverAgentRunner-Runner.app
2937
- target: test/functional/ios/ios/device_wda_attachment_test.rb,test/functional/ios/ios/search_context_test.rb
3038
name: test5
39+
platform: ios
40+
wdaName: WebDriverAgentRunner-Runner.app
3141
- target: test/functional/ios/ios/image_comparison_test.rb
3242
name: test6
43+
platform: ios
44+
wdaName: WebDriverAgentRunner-Runner.app
3345
- target: test/functional/ios/tv_driver_test.rb
3446
name: test7
47+
platform: tvOS
48+
wdaName: WebDriverAgentRunner_tvOS-Runner.app
3549

3650
runs-on: macos-15
3751

@@ -70,6 +84,10 @@ jobs:
7084
appium plugin install execute-driver
7185
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors 2>&1 > appium.log &
7286
87+
- run: |
88+
appium driver run xcuitest download-wda-sim --platform=${{matrix.test_targets.platform}} --outdir=$GITHUB_WORKSPACE/wda
89+
name: Downloading prebuilt WDA
90+
7391
- name: Set up Ruby
7492
uses: ruby/setup-ruby@v1
7593
with:
@@ -83,6 +101,7 @@ jobs:
83101
env:
84102
IGNORE_VERSION_SKIP: true
85103
CI: true
104+
LOCAL_PREBUILT_WDA: $GITHUB_WORKSPACE/wda/${{matrix.test_targets.wdaName}}
86105

87106
- name: Save server output
88107
if: ${{ always() }}
@@ -133,6 +152,10 @@ jobs:
133152
appium plugin install execute-driver
134153
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors > appium.log &
135154
155+
- run: |
156+
appium driver run xcuitest download-wda-sim --platform=${{matrix.test_targets.platform}} --outdir=$GITHUB_WORKSPACE/wda
157+
name: Downloading prebuilt WDA
158+
136159
- name: Set up Ruby
137160
uses: ruby/setup-ruby@v1
138161
with:
@@ -145,6 +168,7 @@ jobs:
145168
env:
146169
IGNORE_VERSION_SKIP: true
147170
CI: true
171+
LOCAL_PREBUILT_WDA: $GITHUB_WORKSPACE/wda/WebDriverAgentRunner-Runner.app
148172

149173
- name: Save server output
150174
if: ${{ always() }}

test/test_helper.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ def ios(platform_name = :ios)
184184
cap = add_xctestrun(real_device, cap.dup, xcode_org_id)
185185
end
186186

187+
if ENV['LOCAL_PREBUILT_WDA']
188+
cap[:caps][:usePreinstalledWDA] = true
189+
cap[:caps][:prebuiltWDAPath] = ENV['LOCAL_PREBUILT_WDA']
190+
end
191+
187192
cap
188193
end
189194

0 commit comments

Comments
 (0)