Skip to content

Commit

Permalink
Test emulator fix
Browse files Browse the repository at this point in the history
RELNOTES=N/A
PiperOrigin-RevId: 663446807
  • Loading branch information
bcorso authored and Dagger Team committed Aug 15, 2024
1 parent 3b1c84e commit ddf0b77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/actions/artifact-android-emulator-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,22 @@ 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
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
avd-name: 'emulator-5554'
script: ./util/run-local-emulator-tests.sh
- name: 'Upload test reports (API ${{ inputs.api-level }})'
if: ${{ always() }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ 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
runs-on: macos-latest
strategy:
matrix: # Run on 16 (PreL), 21 (L), and 26 (O).
api-level: [16, 21, 26, 30]
api-level: [21, 26, 30]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/artifact-android-emulator-tests
Expand Down

0 comments on commit ddf0b77

Please sign in to comment.