chore(ci): Fix maestro file naming and set correct version (#911) #286
This file contains 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: Android Build | |
on: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- '.github/workflows/android.yml' | |
- 'android/**' | |
- 'example/android/**' | |
push: | |
branches: | |
- master | |
jobs: | |
android-build: | |
runs-on: macos-12 | |
concurrency: | |
group: ${{ github.ref }}-android | |
cancel-in-progress: true | |
steps: | |
- uses: oven-sh/setup-bun@v2 | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ./.github/actions/install-dependencies | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Install Maestro CLI | |
run: | | |
export MAESTRO_VERSION=1.31.0; curl -Ls "https://get.maestro.mobile.dev" | bash | |
brew tap facebook/fb | |
brew install facebook/fb/idb-companion | |
- name: Add Maestro to path | |
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH | |
- name: Bundle app | |
run: bun run build:android | |
working-directory: example | |
- name: Run Android Emulator and app | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 31 | |
target: aosp_atd | |
profile: pixel_2 | |
ram-size: '4096M' | |
disk-size: '10G' | |
disable-animations: false | |
avd-name: e2e_emulator | |
arch: x86_64 | |
script: | | |
bun run-example-android | |
bun test:e2e:android | |
- name: Upload report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: E2E Report | |
path: | | |
${{ github.workspace }}/*.mp4 | |
${{ github.workspace }}/*.png | |
${{ github.workspace }}/report*.xml | |
~/.maestro/tests/**/* | |
- name: Store tests result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: e2e_android_report | |
path: | | |
report.xml |