Skip to content

Speed up Windows app installs and foundation checks #1386

Speed up Windows app installs and foundation checks

Speed up Windows app installs and foundation checks #1386

name: Mobile Android E2E
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
workflow_dispatch:
schedule:
- cron: "37 9 * * *"
permissions:
contents: read
concurrency:
group: mobile-android-e2e-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
MAESTRO_VERSION: 2.8.0
MAESTRO_SHA256: b3e561161904fb391875ca5834d5b22cf0b01c052dd1b408ad83e30d8f8951b3
MAESTRO_CLI_NO_ANALYTICS: "true"
MAESTRO_DISABLE_UPDATE_CHECK: "true"
jobs:
android:
name: Android emulator smoke
if: >-
github.repository == 'get-bb/bb'
&& (github.event_name != 'pull_request'
|| contains(github.event.pull_request.labels.*.name, 'mobile-e2e'))
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Setup workspace
uses: ./.github/actions/setup-workspace
with:
node-version: 22.x
pnpm-version: 9.15.0
cache-prefix: mobile-android-e2e
- name: Install Java 17
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961
with:
distribution: temurin
java-version: "17"
- name: Install Maestro
run: |
curl -fsSL --retry 3 -o /tmp/maestro.zip \
"https://github.com/mobile-dev-inc/maestro/releases/download/cli-${MAESTRO_VERSION}/maestro.zip"
echo "${MAESTRO_SHA256} /tmp/maestro.zip" | sha256sum -c -
unzip -qo /tmp/maestro.zip -d /tmp/maestro-unzip
mv /tmp/maestro-unzip/maestro "$HOME/.maestro"
echo "$HOME/.maestro/bin" >> "$GITHUB_PATH"
- name: Build test APK
env:
CI: "1"
EXPO_PUBLIC_BB_E2E: "0"
run: bash apps/mobile/scripts/build-android-local.sh x86_64
- name: Build the web app
run: pnpm exec turbo run build --filter=@bb/app
- name: Enable emulator acceleration
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run Android smoke flow
uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d
with:
api-level: 36
target: google_apis
arch: x86_64
profile: pixel_7
disable-animations: true
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot
script: bash apps/mobile/e2e/scripts/ci-android-smoke.sh
- name: Upload Android test artifacts
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: mobile-e2e-android
path: e2e-artifacts/android
if-no-files-found: ignore
retention-days: 14