Enable KVM in CI #10
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: Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
unit_tests: | |
name: 'Unit tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out the repository' | |
uses: actions/checkout@v4 | |
- name: 'Set up Java' | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: 'Set up Gradle' | |
uses: gradle/actions/setup-gradle@v3 | |
- name: 'Set up the Android SDK' | |
uses: android-actions/setup-android@v3 | |
- name: 'Run unit tests' | |
run: ./gradlew test | |
android_tests: | |
name: 'Android tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out the repository' | |
uses: actions/checkout@v4 | |
- 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: 'Set up Java' | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: 'Set up Gradle' | |
uses: gradle/actions/setup-gradle@v3 | |
- name: 'Set up the Android SDK' | |
uses: android-actions/setup-android@v3 | |
# Once AGP 8.4.X is stable, collapse all of the individual Gradle invocations for | |
# module-specific aospGroupCheck tasks into a single invocation of './gradlew aospGroupCheck' | |
# https://issuetracker.google.com/issues/287312019 | |
- name: 'Run AOSP tests' | |
run: ./gradlew :ui:location:aospGroupCheck | |
# Once AGP 8.4.X is stable, collapse all of the individual Gradle invocations for | |
# module-specific gmsGroupCheck tasks into a single invocation of './gradlew gmsGroupCheck' | |
# https://issuetracker.google.com/issues/287312019 | |
- name: 'Run GMS tests' | |
run: ./gradlew :ui:location:gmsGroupCheck |