Change Legacy basic example into the next basic example #173
Workflow file for this run
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 | |
- next | |
paths: | |
- '.github/workflows/android.yml' | |
- 'android/**' | |
- 'example/android/**' | |
push: | |
branches: | |
- master | |
- next | |
concurrency: | |
group: ${{ github.ref }}-android | |
cancel-in-progress: true | |
jobs: | |
android-build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/install-dependencies | |
- name: Pull dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ./node_modules | |
key: ${{ hashFiles('./package.json') }} | |
- name: Cache example node modules | |
id: cache-example-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cached-example-npm-deps | |
with: | |
path: example/node_modules | |
key: ${{ hashFiles('./example/yarn.lock') }}-${{ hashFiles('./yarn.lock') }} | |
- name: Install required example dependencies on yarn.lock change | |
if: steps.cache-example-npm.outputs.cache-hit != 'true' | |
run: yarn bootstrap-no-pods --frozen-lockfile | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Gradle cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} | |
- name: AVD cache | |
uses: actions/cache@v4 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-cache | |
- name: Install Maestro CLI | |
run: export MAESTRO_VERSION=1.31.0; curl -Ls "https://get.maestro.mobile.dev" | bash | |
- name: Add Maestro to path | |
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH | |
- name: create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
cores: 2 | |
ram-size: 4096M | |
profile: Nexus 6 | |
script: echo "Generated AVD snapshot for caching." | |
- name: Run Android Emulator and app | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
cores: 2 | |
ram-size: 4096M | |
profile: Nexus 6 | |
script: | | |
yarn run-example-android | |
yarn 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 |