Skip to content

chore(deps): bump agp from 8.12.1 to 8.12.2 in /android-tests (#1013) #726

chore(deps): bump agp from 8.12.1 to 8.12.2 in /android-tests (#1013)

chore(deps): bump agp from 8.12.1 to 8.12.2 in /android-tests (#1013) #726

Workflow file for this run

name: Android Device Tests
on:
push:
branches: [ main ]
pull_request:
permissions:
contents: read
checks: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [28, 35]
steps:
- name: Checkout sources
uses: actions/checkout@v5
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
# Use maven cache. Gradle's caching is controlled by its own action.
cache: maven
- name: Prepare local repo for the tests
run: mvn -B -Dandroid-prepare
# Setup Gradle. Cache will be readonly except for the main branch.
# see: https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#using-the-cache-read-only
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
# Setup KVM to speedup the emulator.
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
# Reload AVD from the cache, if available.
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
# adding a unique identifier(today's date) to easily change it and effectively "clean the cache"
key: avd-25062025-${{ matrix.api-level }}
# create AVD if cache failed.
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2.34.0
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: echo "Generated AVD snapshot for caching."
- name: Run tests
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2.34.0
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
working-directory: android-tests
script: ./gradlew device-tests:connectedCheck
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: android-test-results-for-api-${{ matrix.api-level }}
path: |
android-tests/device-tests/build/outputs/androidTest-results/
android-tests/device-tests/build/reports/androidTests/