Save region to local and get region specific data #49
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: androidTest | |
on: | |
pull_request: | |
branches: [ '*' ] | |
push: | |
branches: [ master, v0.3.0 ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/caches | |
key: gradle-cache-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: gradle-cache-${{ runner.os }}- | |
- name: Run local tests | |
run: ./gradlew testDebug --stacktrace | |
- name: Cache AVD | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-cache-${{ runner.os }}-${{ hashFiles('**/*.avd') }} | |
restore-keys: avd-cache-${{ runner.os }}- | |
- name: Create AVD and generate snapshot for caching and Run androidTest | |
uses: reactivecircus/android-emulator-runner@v2 | |
continue-on-error: true | |
env: | |
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 500 | |
with: | |
api-level: 29 | |
emulator-build: 7425822 | |
force-avd-creation: true | |
emulator-options: -wipe-data -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: | | |
echo "Generated AVD snapshot for caching." | |
./gradlew connectedCheck | |
- name: Upload Failing Test Report Log | |
if: steps.testing.outcome != 'success' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: logs | |
path: app/emulator.log | |
- name: Upload build outputs (APKs) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-outputs | |
path: ./app/build/outputs | |
- name: Upload build reports | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-reports | |
path: ./app/build/reports | |