Skip to content

[MIT-1759] UI cutomization configuration (#277) #48

[MIT-1759] UI cutomization configuration (#277)

[MIT-1759] UI cutomization configuration (#277) #48

Workflow file for this run

name: Code Coverage
on: push
jobs:
coverage-report:
name: Coverage Report
# Due to Android emulator issue on Ubuntu, we use macOS instead.
runs-on: macos-latest
strategy:
matrix:
api-level: [ 29 ]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # required for SonarCloud
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Gradle cache
uses: gradle/gradle-build-action@v2
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}
- 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: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
profile: Nexus 6
script: echo "Generated AVD snapshot for caching."
- name: Coverage report
uses: reactivecircus/android-emulator-runner@v2
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
api-level: ${{ matrix.api-level }}
disable-animations: true
force-avd-creation: false
profile: Nexus 6
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# TODO: Remove `touch local.properties` command line once the BuildConfig props are removed from the SDK.
script: |
touch local.properties
./gradlew sdk:jacocoTestReport sdk:sonar