Fix flaky UI tests (#295)

This commit is contained in:
Kirill Kamakin
2024-07-27 16:39:10 +02:00
committed by GitHub
parent 23b1d0f2f8
commit 37bd3abdae

View File

@@ -44,19 +44,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [30]
api-level: [ 30 ]
steps:
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
android: false
large-packages: true
tool-cache: true
dotnet: true
haskell: true
docker-images: true
swap-storage: true
- name: Enable KVM group perms
run: |
@@ -64,34 +63,27 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
- uses: actions/checkout@v4
name: Checkout the code
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}
fetch-depth: 0
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
- uses: actions/setup-java@v4
name: Setup JDK 17
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
arch: x86_64
disable-animations: true
disk-size: 6000M
heap-size: 600M
script: echo "Generated AVD snapshot for caching."
distribution: 'zulu'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
validate-wrappers: true
gradle-home-cache-cleanup: true
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
arch: x86_64
disable-animations: true
disk-size: 6000M