Skip to content

Commit ddf0b77

Browse files
bcorsoDagger Team
authored andcommitted
Test emulator fix
RELNOTES=N/A PiperOrigin-RevId: 663446807
1 parent 3b1c84e commit ddf0b77

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/actions/artifact-android-emulator-tests/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,22 @@ runs:
2525
with:
2626
name: local-snapshot
2727
path: ~/.m2/repository/com/google/dagger
28-
- name: 'Install Java ${{ env.USE_JAVA_VERSION }}'
28+
# JDK 17+ is required for com.android.sdklib.tool.sdkmanager.SdkManagerCli
29+
- name: 'Install Java ${{ env.USE_JAVA_VERSION_FOR_PLUGIN }}'
2930
uses: actions/setup-java@v3
3031
with:
3132
distribution: '${{ env.USE_JAVA_DISTRIBUTION }}'
32-
java-version: '${{ env.USE_JAVA_VERSION }}'
33+
java-version: '${{ env.USE_JAVA_VERSION_FOR_PLUGIN }}'
3334
- name: 'Gradle Android emulator tests (API ${{ inputs.api-level }})'
3435
uses: reactivecircus/android-emulator-runner@v2
3536
with:
3637
api-level: ${{ inputs.api-level }}
3738
target: google_apis
39+
arch: x86_64
40+
force-avd-creation: false
41+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
42+
disable-animations: true
43+
avd-name: 'emulator-5554'
3844
script: ./util/run-local-emulator-tests.sh
3945
- name: 'Upload test reports (API ${{ inputs.api-level }})'
4046
if: ${{ always() }}

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ jobs:
8484
name: 'Artifact Android emulator tests (API ${{ matrix.api-level }})'
8585
# We only run this on master push (essentially a postsubmit) since these
8686
# can take a while to run
87-
if: github.event_name == 'push' && github.repository == 'google/dagger' && github.ref == 'refs/heads/master'
87+
# if: github.event_name == 'push' && github.repository == 'google/dagger' && github.ref == 'refs/heads/master'
8888
needs: bazel-build
8989
# It's recommended to run emulator tests on macOS
9090
# See https://github.com/marketplace/actions/android-emulator-runner
9191
runs-on: macos-latest
9292
strategy:
9393
matrix: # Run on 16 (PreL), 21 (L), and 26 (O).
94-
api-level: [16, 21, 26, 30]
94+
api-level: [21, 26, 30]
9595
steps:
9696
- uses: actions/checkout@v3
9797
- uses: ./.github/actions/artifact-android-emulator-tests

0 commit comments

Comments
 (0)