Skip to content

fix(android): add buildFeatures.buildConfig on for AGP8+ compatibilit… #145

fix(android): add buildFeatures.buildConfig on for AGP8+ compatibilit…

fix(android): add buildFeatures.buildConfig on for AGP8+ compatibilit… #145

Workflow file for this run

name: Android Build
on:
pull_request:
branches:
- master
paths:
- '.github/workflows/android.yml'
- 'android/**'
- 'example/android/**'
push:
branches:
- master
concurrency:
group: ${{ github.ref }}-android
cancel-in-progress: true
jobs:
android-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-dependencies
- name: Pull dependencies
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ hashFiles('./package.json') }}
- name: Cache example node modules
id: cache-example-npm
uses: actions/cache@v3
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@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Gradle cache
uses: actions/cache@v3
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@v3
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@v3
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@v3
with:
name: e2e_android_report
path: |
report.xml