Skip to content

Caching, rename AVD image #129

Caching, rename AVD image

Caching, rename AVD image #129

Workflow file for this run

name: Development tests
on: push
jobs:
test:
name: Tests without emulator
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- name: Check
run: ./gradlew --no-daemon check
- name: Archive results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
lib/build/outputs/lint*
lib/build/reports
overwrite: true
test_on_emulator:
name: Tests with emulator
runs-on: ubuntu-latest-4-cores
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- name: Enable KVM group perms
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
- name: Cache AVD and APKs
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/gradle-managed
~/.android/adb*
key: avd-${{ hashFiles('lib/build.gradle.kts') }} # gradle-managed devices are defined there
- name: Run device tests
run: ./gradlew --no-daemon emulatedCheck
- name: Archive results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
lib/build/reports
overwrite: true