From 78581bd52b7170834a63079a25e9aee3728844bd Mon Sep 17 00:00:00 2001 From: Brad Corso Date: Thu, 15 Aug 2024 14:09:50 -0700 Subject: [PATCH] Test emulator fix RELNOTES=N/A PiperOrigin-RevId: 663446807 --- .github/actions/artifact-android-emulator-tests/action.yml | 7 +++++-- .github/workflows/ci.yml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/actions/artifact-android-emulator-tests/action.yml b/.github/actions/artifact-android-emulator-tests/action.yml index 2fc298797df..95efda11d0e 100644 --- a/.github/actions/artifact-android-emulator-tests/action.yml +++ b/.github/actions/artifact-android-emulator-tests/action.yml @@ -25,16 +25,19 @@ runs: with: name: local-snapshot path: ~/.m2/repository/com/google/dagger - - name: 'Install Java ${{ env.USE_JAVA_VERSION }}' + # JDK 17+ is required for com.android.sdklib.tool.sdkmanager.SdkManagerCli + - name: 'Install Java ${{ env.USE_JAVA_VERSION_FOR_PLUGIN }}' uses: actions/setup-java@v3 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' - java-version: '${{ env.USE_JAVA_VERSION }}' + java-version: '${{ env.USE_JAVA_VERSION_FOR_PLUGIN }}' - name: 'Gradle Android emulator tests (API ${{ inputs.api-level }})' uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ inputs.api-level }} target: google_apis + force-avd-creation: false + avd-name: 'macOS-avd-sdk${{ inputs.api-level }}' script: ./util/run-local-emulator-tests.sh - name: 'Upload test reports (API ${{ inputs.api-level }})' if: ${{ always() }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10a608480af..2a4a814f609 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: name: 'Artifact Android emulator tests (API ${{ matrix.api-level }})' # We only run this on master push (essentially a postsubmit) since these # can take a while to run - if: github.event_name == 'push' && github.repository == 'google/dagger' && github.ref == 'refs/heads/master' + # if: github.event_name == 'push' && github.repository == 'google/dagger' && github.ref == 'refs/heads/master' needs: bazel-build # It's recommended to run emulator tests on macOS # See https://github.com/marketplace/actions/android-emulator-runner