Loading .github/workflows/test-dev.yml +41 −13 Original line number Diff line number Diff line Loading @@ -27,13 +27,10 @@ jobs: test_on_emulator: name: Tests with emulator runs-on: privileged container: image: ghcr.io/bitfireat/docker-android-ci:main options: --privileged env: ANDROID_HOME: /sdk ANDROID_AVD_HOME: /root/.android/avd runs-on: ubuntu-latest-4-cores strategy: matrix: api-level: [31] steps: - uses: actions/checkout@v2 with: Loading @@ -42,13 +39,44 @@ jobs: with: distribution: 'temurin' java-version: 11 cache: 'gradle' - uses: gradle/wrapper-validation-action@v1 - uses: gradle/gradle-build-action@v2 - 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 uses: actions/cache@v3 id: avd-cache with: path: | ~/.android/avd/* ~/.android/adb* key: avd-${{ matrix.api-level }} - name: Create AVD and generate snapshot for caching if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} arch: x86_64 force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: false script: echo "Generated AVD snapshot for caching." - name: Run tests uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} arch: x86_64 force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: ./gradlew --no-daemon app:connectedStandardDebugAndroidTest - name: Start emulator run: start-emulator.sh - name: Run connected tests run: ./gradlew --no-daemon app:connectedStandardDebugAndroidTest - name: Archive results if: always() uses: actions/upload-artifact@v2 Loading Loading
.github/workflows/test-dev.yml +41 −13 Original line number Diff line number Diff line Loading @@ -27,13 +27,10 @@ jobs: test_on_emulator: name: Tests with emulator runs-on: privileged container: image: ghcr.io/bitfireat/docker-android-ci:main options: --privileged env: ANDROID_HOME: /sdk ANDROID_AVD_HOME: /root/.android/avd runs-on: ubuntu-latest-4-cores strategy: matrix: api-level: [31] steps: - uses: actions/checkout@v2 with: Loading @@ -42,13 +39,44 @@ jobs: with: distribution: 'temurin' java-version: 11 cache: 'gradle' - uses: gradle/wrapper-validation-action@v1 - uses: gradle/gradle-build-action@v2 - 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 uses: actions/cache@v3 id: avd-cache with: path: | ~/.android/avd/* ~/.android/adb* key: avd-${{ matrix.api-level }} - name: Create AVD and generate snapshot for caching if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} arch: x86_64 force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: false script: echo "Generated AVD snapshot for caching." - name: Run tests uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} arch: x86_64 force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: ./gradlew --no-daemon app:connectedStandardDebugAndroidTest - name: Start emulator run: start-emulator.sh - name: Run connected tests run: ./gradlew --no-daemon app:connectedStandardDebugAndroidTest - name: Archive results if: always() uses: actions/upload-artifact@v2 Loading