Merge branch 'google:main' into main #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android Test | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: macos-latest | |
timeout-minutes: 50 | |
strategy: | |
# Allow tests to continue on other devices if they fail on one device. | |
fail-fast: false | |
matrix: | |
api-level: [ 30, 33 ] | |
env: | |
TERM: dumb | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
lfs: 'true' | |
- name: Install pulseaudio | |
run: brew install pulseaudio | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
target: android-wear | |
profile: wearos_large_round | |
channel: beta | |
arch: ${{ matrix.api-level == 33 && 'x86_64' || 'x86' }} | |
emulator-options: -no-window -no-snapshot | |
script: ./gradlew connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=Microbenchmark -x media:benchmark:connectedDebugAndroidTest | |
- name: Upload logs | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-${{ matrix.api-level }}-${{ matrix.shard }} | |
path: logcat.txt | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-${{ matrix.api-level }}-${{ matrix.shard }} | |
path: | | |
**/build/reports/* | |
**/build/outputs/*/connected/* | |
**/out/failures/ |