[WIP] Play around with type-safe Compose Navigation #1727
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: Development tests | |
on: | |
push: | |
branches: | |
- '*' | |
concurrency: | |
group: test-dev-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
compile: | |
name: Compile and cache | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
# See https://community.gradle.org/github-actions/docs/setup-gradle/ for more information | |
- uses: gradle/actions/setup-gradle@v3 # creates build cache when on main branch | |
with: | |
cache-encryption-key: ${{ secrets.gradle_encryption_key }} | |
gradle-home-cache-cleanup: true # clean up unused files | |
dependency-graph: generate-and-submit # submit Github Dependency Graph info | |
dependency-graph-continue-on-failure: false | |
- run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:assembleDebug | |
test: | |
needs: compile | |
name: Tests without emulator | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- uses: gradle/actions/setup-gradle@v3 | |
with: | |
cache-encryption-key: ${{ secrets.gradle_encryption_key }} | |
cache-read-only: true | |
- name: Run lint | |
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:lintOseDebug | |
- name: Run unit tests | |
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:testOseDebugUnitTest | |
# generates the build caches because it uses more gradle dependencies | |
test_on_emulator: | |
needs: compile | |
name: Tests with emulator | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- uses: gradle/actions/setup-gradle@v3 | |
with: | |
cache-encryption-key: ${{ secrets.gradle_encryption_key }} | |
cache-read-only: true | |
- 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: Cache AVD | |
uses: actions/cache@v4 | |
with: | |
path: ~/.config/.android/avd | |
key: avd-${{ hashFiles('app/build.gradle.kts') }} # gradle-managed devices are defined there | |
- name: Run device tests | |
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:virtualCheck |