docs: add Debugging section and update Development docs π #244
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DeterminateSystems/nix-installer-action@v14 | |
| - uses: DeterminateSystems/magic-nix-cache-action@v8 | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle.kts', 'gradle/libs.versions.toml') }} | |
| restore-keys: gradle-${{ runner.os }}- | |
| - name: Lint | |
| run: nix develop --command ./gradlew lint | |
| - name: Unit tests | |
| run: nix develop --command ./gradlew test | |
| - name: Assemble debug APK | |
| run: nix develop --command ./gradlew assembleDebug | |
| instrumented-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle.kts', 'gradle/libs.versions.toml') }} | |
| restore-keys: gradle-${{ runner.os }}- | |
| - 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: Run instrumented tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 35 | |
| arch: x86_64 | |
| target: google_apis | |
| script: | | |
| adb shell wm dismiss-keyguard | |
| adb shell settings put global window_animation_scale 0.0 | |
| adb shell settings put global transition_animation_scale 0.0 | |
| adb shell settings put global animator_duration_scale 0.0 | |
| ./gradlew connectedDebugAndroidTest | |
| timeout-minutes: 15 | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: instrumented-test-results | |
| path: app/build/reports/androidTests/ | |
| retention-days: 14 |