|
9 | 9 | env: |
10 | 10 | SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
11 | 11 | SENTRY_ALLOW_FAILURE: false |
| 12 | + MAESTRO_VERSION: 1.39.0 |
12 | 13 |
|
13 | 14 | concurrency: |
14 | 15 | group: ${{ github.workflow }}-${{ github.ref }} |
|
96 | 97 | with: |
97 | 98 | name: build-ios-logs |
98 | 99 | path: ios/xcodebuild.log |
| 100 | + |
| 101 | + run-ui-test-android: |
| 102 | + name: UI Test Android |
| 103 | + needs: build-android |
| 104 | + runs-on: ubuntu-latest |
| 105 | + steps: |
| 106 | + - uses: actions/checkout@v4 |
| 107 | + |
| 108 | + - name: Setup KVM |
| 109 | + shell: bash |
| 110 | + run: | |
| 111 | + # check if virtualization is supported... |
| 112 | + sudo apt install -y --no-install-recommends cpu-checker coreutils && echo "CPUs=$(nproc --all)" && kvm-ok |
| 113 | + # allow access to KVM to run the emulator |
| 114 | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \ |
| 115 | + | sudo tee /etc/udev/rules.d/99-kvm4all.rules |
| 116 | + sudo udevadm control --reload-rules |
| 117 | + sudo udevadm trigger --name-match=kvm |
| 118 | +
|
| 119 | + - name: Download APK artifact |
| 120 | + uses: actions/download-artifact@v4 |
| 121 | + with: |
| 122 | + name: empower-plant-react-native-android |
| 123 | + |
| 124 | + - name: Install Maestro |
| 125 | + uses: dniHze/maestro-test-action@bda8a93211c86d0a05b7a4597c5ad134566fbde4 # [email protected] |
| 126 | + with: |
| 127 | + maestro-version: ${{env.MAESTRO_VERSION}} |
| 128 | + |
| 129 | + - name: Run tests |
| 130 | + uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # [email protected] |
| 131 | + with: |
| 132 | + api-level: 30 |
| 133 | + force-avd-creation: false |
| 134 | + disable-animations: true |
| 135 | + disable-spellchecker: true |
| 136 | + target: 'aosp_atd' |
| 137 | + channel: canary # Necessary for ATDs |
| 138 | + emulator-options: > |
| 139 | + -no-window |
| 140 | + -no-snapshot-save |
| 141 | + -gpu swiftshader_indirect |
| 142 | + -noaudio |
| 143 | + -no-boot-anim |
| 144 | + -camera-back none |
| 145 | + -camera-front none |
| 146 | + -timezone US/Pacific |
| 147 | + script: | |
| 148 | + adb install -r -d app-release.apk |
| 149 | + maestro test maestro --debug-output maestro-logs --env=APP_ID=com.sentry_react_native |
0 commit comments