Add tests for conversation screen #367
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: Pull request checks | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-debug-apk: | |
| name: Build debug APK | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Check out sources | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: gradle | |
| - name: Assemble debug APK | |
| run: ./gradlew :app:assembleDebug --no-daemon --stacktrace --console=plain | |
| ktlint: | |
| name: ktlintCheck | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Check out sources | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: gradle | |
| - name: Run ktlintCheck | |
| run: ./gradlew ktlintCheck --no-daemon --stacktrace --console=plain | |
| - name: Upload ktlint reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ktlint-reports | |
| path: | | |
| build/reports/ktlint/ | |
| app/build/reports/ktlint/ | |
| if-no-files-found: ignore | |
| detekt: | |
| name: Detekt | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Check out sources | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: gradle | |
| - name: Run Detekt | |
| run: ./gradlew :app:detekt --no-daemon --stacktrace --console=plain | |
| - name: Upload Detekt reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: detekt-reports | |
| path: app/build/reports/detekt/ | |
| if-no-files-found: ignore | |
| unit-tests: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Check out sources | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Set up JDKs | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: | | |
| 17 | |
| 21 | |
| cache: gradle | |
| - name: Run unit tests and coverage gate | |
| run: > | |
| ./gradlew :app:jacocoUnitTestVerification | |
| -PunitTestMinCoverage=80 | |
| -PunitTestMinBranchCoverage=60 | |
| --no-daemon --stacktrace --console=plain | |
| - name: Upload unit test reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unit-test-reports | |
| path: | | |
| app/build/reports/jacoco/jacocoUnitTestReport/ | |
| app/build/reports/tests/testDebugUnitTest/ | |
| app/build/test-results/testDebugUnitTest/ | |
| if-no-files-found: ignore | |
| instrumented-tests: | |
| name: Instrumented tests (Android 16 x86_64) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Check out sources | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: gradle | |
| - 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: Restore AVD cache | |
| id: avd-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.android/avd/* | |
| ~/.android/adb* | |
| key: avd-36-x86_64-default | |
| - name: Create AVD and generate snapshot for caching | |
| if: steps.avd-cache.outputs.cache-hit != 'true' | |
| uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d | |
| with: | |
| api-level: 36 | |
| arch: x86_64 | |
| target: default | |
| force-avd-creation: false | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: false | |
| script: echo "Generated AVD snapshot for caching." | |
| - name: Run instrumented tests and coverage gate | |
| uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d | |
| with: | |
| api-level: 36 | |
| arch: x86_64 | |
| target: default | |
| force-avd-creation: false | |
| emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: true | |
| script: > | |
| ./gradlew :app:connectedDebugAndroidTest :app:jacocoAndroidTestVerification | |
| -PandroidTestCoverage=true | |
| -PandroidTestMinCoverage=80 | |
| -PandroidTestMinBranchCoverage=50 | |
| --no-daemon --stacktrace --console=plain | |
| - name: Upload instrumented test reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: instrumented-test-reports | |
| path: | | |
| app/build/outputs/code_coverage/debugAndroidTest/connected/ | |
| app/build/outputs/androidTest-results/connected/ | |
| app/build/reports/jacoco/jacocoAndroidTestReport/ | |
| app/build/reports/androidTests/connected/ | |
| if-no-files-found: ignore |