From 646f045f1c5d9b83274dd6a690cf31561351be7f Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Sat, 28 Jun 2025 14:39:45 -0700 Subject: [PATCH 1/2] ci: use prebuilt wda --- .github/workflows/functional-test.yml | 24 ++++++++++++++++++++++++ test/test_helper.rb | 5 +++++ 2 files changed, 29 insertions(+) diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index 90ad8242..1044a0ff 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -20,18 +20,32 @@ jobs: test_targets: - target: test/functional/ios/driver_test.rb,test/functional/ios/patch_test.rb name: test1 + platform: ios + wdaName: WebDriverAgentRunner-Runner.app - target: test/functional/ios/webdriver/create_session_test.rb,test/functional/ios/webdriver/w3c_actions_test.rb name: test2 + platform: ios + wdaName: WebDriverAgentRunner-Runner.app - target: test/functional/ios/webdriver/device_test.rb name: test3 + platform: ios + wdaName: WebDriverAgentRunner-Runner.app - target: test/functional/ios/ios/device_test.rb name: test4 + platform: ios + wdaName: WebDriverAgentRunner-Runner.app - target: test/functional/ios/ios/device_wda_attachment_test.rb,test/functional/ios/ios/search_context_test.rb name: test5 + platform: ios + wdaName: WebDriverAgentRunner-Runner.app - target: test/functional/ios/ios/image_comparison_test.rb name: test6 + platform: ios + wdaName: WebDriverAgentRunner-Runner.app - target: test/functional/ios/tv_driver_test.rb name: test7 + platform: tvOS + wdaName: WebDriverAgentRunner_tvOS-Runner.app runs-on: macos-15 @@ -70,6 +84,10 @@ jobs: appium plugin install execute-driver nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors 2>&1 > appium.log & + - run: | + appium driver run xcuitest download-wda-sim --platform=${{matrix.test_targets.platform}} --outdir=$GITHUB_WORKSPACE/wda + name: Downloading prebuilt WDA + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -83,6 +101,7 @@ jobs: env: IGNORE_VERSION_SKIP: true CI: true + LOCAL_PREBUILT_WDA: $GITHUB_WORKSPACE/wda/${{matrix.test_targets.wdaName}} - name: Save server output if: ${{ always() }} @@ -133,6 +152,10 @@ jobs: appium plugin install execute-driver nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors > appium.log & + - run: | + appium driver run xcuitest download-wda-sim --platform=${{matrix.test_targets.platform}} --outdir=$GITHUB_WORKSPACE/wda + name: Downloading prebuilt WDA + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -145,6 +168,7 @@ jobs: env: IGNORE_VERSION_SKIP: true CI: true + LOCAL_PREBUILT_WDA: $GITHUB_WORKSPACE/wda/WebDriverAgentRunner-Runner.app - name: Save server output if: ${{ always() }} diff --git a/test/test_helper.rb b/test/test_helper.rb index 41e6de99..2f2d11fc 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -184,6 +184,11 @@ def ios(platform_name = :ios) cap = add_xctestrun(real_device, cap.dup, xcode_org_id) end + if ENV['LOCAL_PREBUILT_WDA'] + cap[:caps][:usePreinstalledWDA] = true + cap[:caps][:prebuiltWDAPath] = ENV['LOCAL_PREBUILT_WDA'] + end + cap end From 88aac65510f8b8896f418d24237b3be73af2ec96 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Sat, 28 Jun 2025 14:57:01 -0700 Subject: [PATCH 2/2] use ${{ github.workspace }} --- .github/workflows/functional-test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index c3346551..7d86a98a 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -85,7 +85,7 @@ jobs: nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors 2>&1 > appium.log & - run: | - appium driver run xcuitest download-wda-sim --platform=${{matrix.test_targets.platform}} --outdir=$GITHUB_WORKSPACE/wda + appium driver run xcuitest download-wda-sim --platform=${{matrix.test_targets.platform}} --outdir=${{ github.workspace }}/wda name: Downloading prebuilt WDA - name: Set up Ruby @@ -101,7 +101,7 @@ jobs: env: IGNORE_VERSION_SKIP: true CI: true - LOCAL_PREBUILT_WDA: $GITHUB_WORKSPACE/wda/${{matrix.test_targets.wdaName}} + LOCAL_PREBUILT_WDA: ${{ github.workspace }}/wda/${{matrix.test_targets.wdaName}} - name: Save server output if: ${{ always() }} @@ -160,7 +160,7 @@ jobs: nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors > appium.log & - run: | - appium driver run xcuitest download-wda-sim --platform=${{matrix.test_targets.platform}} --outdir=$GITHUB_WORKSPACE/wda + appium driver run xcuitest download-wda-sim --platform=${{matrix.test_targets.platform}} --outdir=${{ github.workspace }}/wda name: Downloading prebuilt WDA - name: Set up Ruby @@ -175,7 +175,7 @@ jobs: env: IGNORE_VERSION_SKIP: true CI: true - LOCAL_PREBUILT_WDA: $GITHUB_WORKSPACE/wda/WebDriverAgentRunner-Runner.app + LOCAL_PREBUILT_WDA: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app - name: Save server output if: ${{ always() }}