fix preview typo #176
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: lint, build, and test | |
on: | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
push: | |
paths-ignore: | |
- "**.md" | |
jobs: | |
lint: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- uses: gradle/actions/setup-gradle@v4 | |
with: | |
# Only write to the cache for builds on the 'main' and 'develop' branches. (Default is 'main' only.) | |
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} | |
- name: Lint | |
run: ./gradlew lint | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- uses: gradle/actions/setup-gradle@v4 | |
with: | |
# Only write to the cache for builds on the 'main' and 'develop' branches. (Default is 'main' only.) | |
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} | |
- name: Build the app | |
run: ./gradlew build -x lint | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: app/build/outputs/apk/debug/app-debug.apk | |
name: app-debug | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: app/build/outputs/apk/release/app-release-unsigned.apk | |
name: app-release-unsigned | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Delete unnecessary tools to free up some space | |
uses: jlumbroso/[email protected] | |
with: | |
android: false # Don't remove Android tools | |
large-packages: false # includes google-cloud-sdk and it's slow | |
tool-cache: true | |
dotnet: true | |
haskell: true | |
swap-storage: true | |
docker-images: true | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- uses: gradle/actions/setup-gradle@v4 | |
with: | |
# Only write to the cache for builds on the 'main' and 'develop' branches. (Default is 'main' only.) | |
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} | |
- 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: Accept Android licenses | |
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true | |
# NOTE: Limiting to one gradle worker because otherwise it was trying to install the Android Emulator multiple times | |
# simultaneously, causing FileAlreadyExistsExceptions. | |
- name: Run instrumented tests on a subset of supported devices | |
run: | | |
./gradlew ciGroupdebugAndroidTest \ | |
-Dorg.gradle.workers.max=1 \ | |
-Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect \ | |
--info |