diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1476bac..84801d1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,6 +28,7 @@ jobs: test_on_emulator: name: Tests with emulator runs-on: ubuntu-latest + timeout-minutes: 30 # emulator tests used to hang until the 6 h limit steps: - uses: actions/checkout@v7 with: @@ -39,6 +40,15 @@ jobs: cache: gradle - uses: gradle/actions/setup-gradle@v6 + # Gradle and Android SDK often take more space than what is available on the default runner. + # We try to free a few GB here to make gradle-managed devices more reliable. + - name: Free some disk space + uses: jlumbroso/free-disk-space@main + with: + android: false # we need the Android SDK + large-packages: false # apt takes too long + swap-storage: false # Gradle needs much memory + - 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 @@ -52,7 +62,7 @@ jobs: key: avd-${{ hashFiles('lib/build.gradle.kts') }} # gradle-managed devices are defined there - name: Run device tests - run: ./gradlew --configuration-cache --build-cache lib:virtualCheck + run: ./gradlew --configuration-cache --build-cache lib:virtualDebugAndroidTest # Required status check for the default branch (see repository ruleset) tests: diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index bf3f419..605e50d 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -65,9 +65,8 @@ android { localDevices { create("virtual") { device = "Pixel 3" - apiLevel = 33 + apiLevel = 34 // same as davx5-ose systemImageSource = "aosp-atd" - testedAbi = "x86_64" } } }