|
| 1 | +name: Test Android Devices [chrome, cpu1] |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + environment: |
| 7 | + description: "Environment to run tests against" |
| 8 | + type: choice |
| 9 | + options: |
| 10 | + - prod |
| 11 | + - dev |
| 12 | + default: "prod" |
| 13 | + required: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + test-android-devices: |
| 17 | + name: ${{ matrix.device }} - API ${{ matrix.api-level }} |
| 18 | + runs-on: ubuntu-latest |
| 19 | + |
| 20 | + strategy: |
| 21 | + # Don't cancel all jobs if one fails |
| 22 | + fail-fast: false |
| 23 | + matrix: |
| 24 | + include: |
| 25 | + # Pixel 6 supports API 29-35 |
| 26 | + - device: pixel-6 |
| 27 | + api-level: "29" |
| 28 | + - device: pixel-6 |
| 29 | + api-level: "30" |
| 30 | + - device: pixel-6 |
| 31 | + api-level: "31" |
| 32 | + - device: pixel-6 |
| 33 | + api-level: "32" |
| 34 | + - device: pixel-6 |
| 35 | + api-level: "33" |
| 36 | + - device: pixel-6 |
| 37 | + api-level: "34" |
| 38 | + - device: pixel-6 |
| 39 | + api-level: "35" |
| 40 | + |
| 41 | + # Google Play versions of Pixel 6 |
| 42 | + - device: pixel-6 |
| 43 | + api-level: "34" |
| 44 | + google-play: true |
| 45 | + - device: pixel-6 |
| 46 | + api-level: "35" |
| 47 | + google-play: true |
| 48 | + |
| 49 | + # Pixel 6 Pro supports API 33-35 |
| 50 | + - device: pixel-6-pro |
| 51 | + api-level: "33" |
| 52 | + - device: pixel-6-pro |
| 53 | + api-level: "34" |
| 54 | + - device: pixel-6-pro |
| 55 | + api-level: "35" |
| 56 | + |
| 57 | + # Pixel 7 supports API 33-35 |
| 58 | + - device: pixel-7 |
| 59 | + api-level: "33" |
| 60 | + - device: pixel-7 |
| 61 | + api-level: "34" |
| 62 | + - device: pixel-7 |
| 63 | + api-level: "35" |
| 64 | + |
| 65 | + # Google Play versions of Pixel 7 |
| 66 | + - device: pixel-7 |
| 67 | + api-level: "34" |
| 68 | + google-play: true |
| 69 | + - device: pixel-7 |
| 70 | + api-level: "35" |
| 71 | + google-play: true |
| 72 | + |
| 73 | + # Pixel 7 Pro supports API 33-35 |
| 74 | + - device: pixel-7-pro |
| 75 | + api-level: "33" |
| 76 | + - device: pixel-7-pro |
| 77 | + api-level: "34" |
| 78 | + - device: pixel-7-pro |
| 79 | + api-level: "35" |
| 80 | + |
| 81 | + # Generic Tablet supports API 33-35 |
| 82 | + - device: generic-tablet |
| 83 | + api-level: "33" |
| 84 | + - device: generic-tablet |
| 85 | + api-level: "34" |
| 86 | + - device: generic-tablet |
| 87 | + api-level: "35" |
| 88 | + |
| 89 | + # Google Play versions of Generic Tablet |
| 90 | + - device: generic-tablet |
| 91 | + api-level: "34" |
| 92 | + google-play: true |
| 93 | + - device: generic-tablet |
| 94 | + api-level: "35" |
| 95 | + google-play: true |
| 96 | + |
| 97 | + steps: |
| 98 | + - uses: actions/checkout@v3 |
| 99 | + |
| 100 | + - name: Run Android Device Tests |
| 101 | + uses: devicecloud-dev/device-cloud-for-maestro@main |
| 102 | + with: |
| 103 | + api-key: ${{ github.event.inputs.environment == 'dev' && secrets.DCD_DEV_API_KEY || secrets.DCD_API_KEY }} |
| 104 | + api-url: ${{ github.event.inputs.environment == 'dev' && 'https://api.dev.devicecloud.dev' || '' }} |
| 105 | + app-file: ./binaries/sample.apk |
| 106 | + workspace: ./flows/chrome-flow.yaml |
| 107 | + android-device: ${{ matrix.device }} |
| 108 | + android-api-level: ${{ matrix.api-level }} |
| 109 | + google-play: ${{ matrix.google-play || '' }} |
| 110 | + runner-type: cpu1 |
| 111 | + name: "${{ matrix.device }} - Android API ${{ matrix.api-level }}${{ matrix.google-play && ' with Play' || '' }} Test Run" |
0 commit comments