Merge pull request #199 from bumptech/master #8
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: Instrumentation Tests | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
include: | |
- api-level: 22 | |
arch: x86 | |
target: default | |
- api-level: 23 | |
arch: x86 | |
target: default | |
- api-level: 31 | |
arch: x86_64 | |
target: google_apis | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v2 | |
- name: AVD cache | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }} | |
- name: create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: ${{ matrix.arch }} | |
target: ${{ matrix.target }} | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
ram-size: 4096M | |
emulator-boot-timeout: 12000 | |
script: echo "Generated AVD snapshot for caching." | |
- name: run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: ${{ matrix.arch }} | |
target: ${{ matrix.target }} | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
ram-size: 4096M | |
emulator-boot-timeout: 12000 | |
script: ./gradlew :instrumentation:connectedCheck :integration:compose:connectedCheck |