Events changes #353
Workflow file for this run
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: Instrumented tests | |
on: | |
pull_request: | |
branches: | |
- 'development' | |
- 'master' | |
- '*_baseline' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
api-level: [ 29 ] | |
shard: [ 0, 1, 2, 3 ] | |
steps: | |
- name: Enable KVM group perms | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: 'gradle' | |
- name: AVD cache | |
uses: actions/cache@v4 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-${{ matrix.api-level }} | |
- 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 }} | |
avd-name: macOS-avd-arm64-v8a-29 | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: echo "Generated AVD snapshot for caching." | |
- name: Assemble debug AndroidTest | |
run: ./gradlew assembleDebugAndroidTest | |
- name: Run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
profile: Galaxy Nexus | |
script: ./gradlew connectedCheck --continue -Pandroid.testInstrumentationRunnerArguments.numShards=4 -Pandroid.testInstrumentationRunnerArguments.shardIndex=${{ matrix.shard }} |