|  | 
|  | 1 | +name: iOS WDIO Tests with Appium 3 | 
|  | 2 | + | 
|  | 3 | +on: | 
|  | 4 | +    pull_request: | 
|  | 5 | + | 
|  | 6 | +env: | 
|  | 7 | +  CI: true | 
|  | 8 | +  SHOW_XCODE_LOG: true | 
|  | 9 | +  PREBUILT_WDA_PATH: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app | 
|  | 10 | + | 
|  | 11 | +jobs: | 
|  | 12 | +  wdio_ios: | 
|  | 13 | +    runs-on: macos-26 | 
|  | 14 | +    name: WDIO iOS (Xcode 16.4) | 
|  | 15 | +    steps: | 
|  | 16 | +    - uses: actions/checkout@v4 | 
|  | 17 | + | 
|  | 18 | +    - name: Install Node.js 22.x | 
|  | 19 | +      uses: actions/setup-node@v3 | 
|  | 20 | +      with: | 
|  | 21 | +        node-version: '22.x' | 
|  | 22 | + | 
|  | 23 | +    - name: Select Xcode 16.4 | 
|  | 24 | +      uses: maxim-lobanov/setup-xcode@v1 | 
|  | 25 | +      with: | 
|  | 26 | +        xcode-version: '16.4' | 
|  | 27 | + | 
|  | 28 | +    - name: List Installed Simulators | 
|  | 29 | +      run: xcrun simctl list devices available | 
|  | 30 | +    - name: Install jq | 
|  | 31 | +      run: brew install jq | 
|  | 32 | + | 
|  | 33 | +    - run: | | 
|  | 34 | +        version=$(grep 'appium_flutter_server:' README.md | awk '{print $2}') | 
|  | 35 | +        ios_app="https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/$version/ios.zip" | 
|  | 36 | +        echo "Downloading from: $ios_app" | 
|  | 37 | +        curl -LO "$ios_app" | 
|  | 38 | +        echo "APP_PATH=$(pwd)/ios.zip" >> $GITHUB_ENV | 
|  | 39 | +      name: Download sample iOS app | 
|  | 40 | +       | 
|  | 41 | +    - name: Start iOS Simulator UI | 
|  | 42 | +      run: open -Fn "$(xcode-select --print-path)/Applications/Simulator.app" | 
|  | 43 | + | 
|  | 44 | +    - name: Boot simulator | 
|  | 45 | +      id: prepareSimulator | 
|  | 46 | +      uses: futureware-tech/simulator-action@v4 | 
|  | 47 | +      with: | 
|  | 48 | +        model: 'iPhone 16' | 
|  | 49 | +        os_version: '18.5' | 
|  | 50 | +        shutdown_after_job: false | 
|  | 51 | +        wait_for_boot: true | 
|  | 52 | + | 
|  | 53 | +    - run: | | 
|  | 54 | +        target_sim_id=$(xcrun simctl list devices available | grep -A 10 "Booted" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1) | 
|  | 55 | +        echo "Target sim id: $target_sim_id" | 
|  | 56 | +        echo "udid=$target_sim_id" >> $GITHUB_ENV | 
|  | 57 | +
 | 
|  | 58 | +    - run: | | 
|  | 59 | +        npm install -g appium | 
|  | 60 | +        npm install --no-package-lock | 
|  | 61 | +        npm run build-flutter-by-service | 
|  | 62 | +        npm run build | 
|  | 63 | +      name: Install Appium and deps | 
|  | 64 | +       | 
|  | 65 | +    - run: | | 
|  | 66 | +        appium driver list | 
|  | 67 | +        appium driver doctor xcuitest | 
|  | 68 | +        appium driver run xcuitest download-wda-sim  --platform=ios --outdir=$(dirname "$PREBUILT_WDA_PATH") | 
|  | 69 | +        echo "WDA path: $PREBUILT_WDA_PATH" | 
|  | 70 | +        echo "WDA_PATH=$PREBUILT_WDA_PATH" >> $GITHUB_ENV | 
|  | 71 | +      name: Build WDA with XCUITest driver | 
|  | 72 | +       | 
|  | 73 | +    - run: | | 
|  | 74 | +        echo "UDID: $udid" | 
|  | 75 | +        echo "WDA path: $PREBUILT_WDA_PATH" | 
|  | 76 | +        xcrun simctl install $udid $PREBUILT_WDA_PATH | 
|  | 77 | +        xcrun simctl launch $udid "com.facebook.WebDriverAgentRunner.xctrunner" | 
|  | 78 | +      name: Install and launch WDA on Simulator | 
|  | 79 | +             | 
|  | 80 | +    - run: | | 
|  | 81 | +        mkdir -p appium-logs | 
|  | 82 | +        UDID=$udid APP_PATH=$APP_PATH npm run wdio-ios | tee appium-logs/logs.txt | 
|  | 83 | +      name: Run WDIO iOS | 
|  | 84 | +       | 
|  | 85 | +
 | 
|  | 86 | +    - name: Upload logs | 
|  | 87 | +      if: ${{ always() }} | 
|  | 88 | +      uses: actions/upload-artifact@v4 | 
|  | 89 | +      with: | 
|  | 90 | +        name: appium-logs | 
|  | 91 | +        path: appium-logs | 
0 commit comments