Skip to content

Commit

Permalink
ci: Use reactivecircus/android-emulator-runner for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 authored and Dinnerbone committed Mar 26, 2024
1 parent e9ebf59 commit 605776b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,18 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

# https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/
- name: Enable KVM
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: Test
run: ./gradlew deviceTests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew connectedCheck

- name: Decode keystore
if: ${{ !github.event.pull_request.head.repo.fork }}
Expand Down
18 changes: 0 additions & 18 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,6 @@ android {
isUniversalApk = true
}
}

testOptions {
managedDevices {
localDevices {
create("pixel3api34") {
device = "Pixel 3"
apiLevel = 34
systemImageSource = "aosp"
}
}
}
}
}

dependencies {
Expand Down Expand Up @@ -148,9 +136,3 @@ cargoNdk {
apiLevel = 26
buildType = "release"
}

tasks {
register("deviceTests") {
dependsOn("pixel3api34DebugAndroidTest")
}
}

0 comments on commit 605776b

Please sign in to comment.