Test iOS Devices #411
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test iOS Devices | |
| on: | |
| # Run at 1 AM UTC daily | |
| schedule: | |
| - cron: "0 1 * * *" | |
| # Allow manual triggering | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: "Environment to run tests against" | |
| type: choice | |
| options: | |
| - prod | |
| - dev | |
| default: "prod" | |
| required: true | |
| use-beta: | |
| description: "Use beta version" | |
| type: boolean | |
| default: false | |
| required: false | |
| jobs: | |
| test-ios-devices: | |
| name: ${{ matrix.device }} - iOS ${{ matrix.ios-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| # Don't cancel all jobs if one fails | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # iPhone 14 series (iOS 16-18) | |
| - device: iphone-14 | |
| ios-version: "16" | |
| - device: iphone-14 | |
| ios-version: "17" | |
| - device: iphone-14 | |
| ios-version: "18" | |
| - device: iphone-14-pro | |
| ios-version: "16" | |
| - device: iphone-14-pro | |
| ios-version: "17" | |
| - device: iphone-14-pro | |
| ios-version: "18" | |
| # iPhone 15 series (iOS 17-18) | |
| - device: iphone-15 | |
| ios-version: "17" | |
| - device: iphone-15 | |
| ios-version: "18" | |
| - device: iphone-15-pro | |
| ios-version: "17" | |
| - device: iphone-15-pro | |
| ios-version: "18" | |
| # iPhone 16 series (iOS 18, 26) | |
| - device: iphone-16 | |
| ios-version: "18" | |
| - device: iphone-16 | |
| ios-version: "26" | |
| - device: iphone-16-plus | |
| ios-version: "18" | |
| - device: iphone-16-plus | |
| ios-version: "26" | |
| - device: iphone-16-pro | |
| ios-version: "18" | |
| - device: iphone-16-pro | |
| ios-version: "26" | |
| - device: iphone-16-pro-max | |
| ios-version: "18" | |
| - device: iphone-16-pro-max | |
| ios-version: "26" | |
| # iPad Pro (iOS 18, 26) | |
| - device: ipad-pro-6th-gen | |
| ios-version: "18" | |
| - device: ipad-pro-6th-gen | |
| ios-version: "26" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set Flow File and App Binary | |
| id: set-flow-file | |
| run: | | |
| if [[ "${{ matrix.device }}" == "iphone-16-pro" || "${{ matrix.device }}" == "iphone-16-pro-max" || "${{ matrix.device }}" == "ipad-pro-6th-gen" ]]; then | |
| echo "flow-file=./flows/ios-flow-simple.yaml" >> $GITHUB_OUTPUT | |
| else | |
| echo "flow-file=./flows/ios-flow.yaml" >> $GITHUB_OUTPUT | |
| fi | |
| # Use older Wikipedia zip for iOS 16 tests | |
| if [[ "${{ matrix.ios-version }}" == "16" ]]; then | |
| echo "use-zip=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "use-zip=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Run iOS Device Tests (iOS 16 with zip) | |
| if: steps.set-flow-file.outputs.use-zip == 'true' | |
| uses: devicecloud-dev/device-cloud-for-maestro@v2 | |
| with: | |
| api-key: ${{ github.event.inputs.environment == 'dev' && secrets.DCD_DEV_API_KEY || secrets.DCD_API_KEY }} | |
| api-url: ${{ github.event.inputs.environment == 'dev' && 'https://api.dev.devicecloud.dev' || '' }} | |
| app-file: binaries/wikipedia-pre26.zip | |
| workspace: ${{ steps.set-flow-file.outputs.flow-file }} | |
| ios-device: ${{ matrix.device }} | |
| ios-version: ${{ matrix.ios-version }} | |
| use-beta: ${{ github.event.inputs.use-beta }} | |
| name: "${{ matrix.device }} - iOS ${{ matrix.ios-version }} Test Run" | |
| - name: Run iOS Device Tests (Other versions with app-binary-id) | |
| if: steps.set-flow-file.outputs.use-zip != 'true' | |
| uses: devicecloud-dev/device-cloud-for-maestro@v2 | |
| with: | |
| api-key: ${{ github.event.inputs.environment == 'dev' && secrets.DCD_DEV_API_KEY || secrets.DCD_API_KEY }} | |
| api-url: ${{ github.event.inputs.environment == 'dev' && 'https://api.dev.devicecloud.dev' || '' }} | |
| app-binary-id: ${{ github.event.inputs.environment == 'dev' && '9e4f3c0b-146e-4bc8-8820-d49eb5e25198' || '81155b2c-e18d-4527-871a-6788068d836b' }} | |
| workspace: ${{ steps.set-flow-file.outputs.flow-file }} | |
| ios-device: ${{ matrix.device }} | |
| ios-version: ${{ matrix.ios-version }} | |
| use-beta: ${{ github.event.inputs.use-beta }} | |
| name: "${{ matrix.device }} - iOS ${{ matrix.ios-version }} Test Run" |