Skip to content

Set api level to 29 #857

Set api level to 29

Set api level to 29 #857

Workflow file for this run

name: Android CI
on:
push:
pull_request:
jobs:
build:
name: Build project
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run ktlint
run: ./gradlew sdk:ktlintCheck
- name: Build project
run: ./gradlew sdk:build -x test
unit-intrumented-test:
name: Unit/Instrumented tests with coverage report
runs-on: macos-latest
strategy:
matrix:
api-level: [ 29 ]
needs: build
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: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- 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: Run unit/instrumented tests
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
script: ./gradlew sdk:jacocoTestReport sdk:sonar