Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test emulator fix #4394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading