From 37bd3abdae03d4f9ae53c896e4671fb068162c61 Mon Sep 17 00:00:00 2001 From: Kirill Kamakin Date: Sat, 27 Jul 2024 16:39:10 +0200 Subject: [PATCH] Fix flaky UI tests (#295) --- .github/workflows/check.yml | 54 ++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 6726577..b2e64c4 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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