From 9c636f5ee2bb78c566d87667d2e6156ab5e12210 Mon Sep 17 00:00:00 2001 From: XiangRongLin <41164160+XiangRongLin@users.noreply.github.com> Date: Tue, 6 Jul 2021 16:24:32 +0200 Subject: [PATCH] Specify emulator-build version in CI job This is a workaround for the emulator bug https://github.com/ReactiveCircus/android-emulator-runner/issues/160 --- .github/workflows/ci.yml | 59 ++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8065d5e6a..da79aa35f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,35 +44,36 @@ jobs: name: app path: app/build/outputs/apk/debug/*.apk -# Disabled until emulator works again. see https://github.com/TeamNewPipe/NewPipe/pull/6560 -# test-android: - # macos has hardware acceleration. See android-emulator-runner action -# runs-on: macos-latest -# strategy: -# matrix: - # api-level 19 is min sdk, but throws errors related to desugaring -# api-level: [21, 29] -# steps: -# - uses: actions/checkout@v2 -# -# - name: set up JDK 8 -# uses: actions/setup-java@v2 -# with: -# java-version: 8 -# distribution: "adopt" -# -# - name: Cache Gradle dependencies -# uses: actions/cache@v2 -# with: -# path: ~/.gradle/caches -# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} -# restore-keys: ${{ runner.os }}-gradle -# -# - name: Run android tests -# uses: reactivecircus/android-emulator-runner@v2 -# with: -# api-level: ${{ matrix.api-level }} -# script: ./gradlew connectedCheck + test-android: + # macos has hardware acceleration. See android-emulator-runner action + runs-on: macos-latest + strategy: + matrix: + # api-level 19 is min sdk, but throws errors related to desugaring + api-level: [ 21, 29 ] + steps: + - uses: actions/checkout@v2 + + - name: set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: 8 + distribution: "adopt" + + - name: Cache Gradle dependencies + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + + - name: Run android tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + # workaround to emulator bug: https://github.com/ReactiveCircus/android-emulator-runner/issues/160 + emulator-build: 7425822 + script: ./gradlew connectedCheck # sonar: # runs-on: ubuntu-latest