Updated GitHub Action to use ARM-based emulator and QEMU hypervisor #487
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: CI | |
on: [push, pull_request] | |
jobs: | |
build-and-test: | |
name: Build and run tests | |
runs-on: macos-latest | |
env: | |
GRADLE_OPTS: -Dorg.gradle.jvmargs="-XX:MaxMetaspaceSize=1g" | |
steps: | |
- name: Checkout current develop branch | |
uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v3.11.0 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Run unit/instrumentation tests and coverage generation | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 30 | |
target: google_apis | |
arch: arm64-v8a | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -accel qemu | |
disable-animations: true | |
script: ./gradlew -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest,androidx.test.filters.LargeTest jacocoTestReport --stacktrace | |
- name: SonarCloud static code and coverage analysis | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./gradlew sonarqube -Dsonar.login="$SONAR_TOKEN" |