* Update Kotlin and KSP * Downgrade Kaspresso to last released * Update Compose compiler extension * Fix flaky UI test * Update AGP version * Fix flakySafely scope * Fix missing system image for UI tests * Use Intel MacOS to run UI tests * Revert "Fix missing system image for UI tests" This reverts commit 9003c37315f253835f3788ab2fecd402fa5522be. * Update test device API level to 34 * Use google-atd system image source * Update managed devices declaration syntax * Use device and syntax from now in android app * Try ubuntu agent for UI tests * Use an actual emulator instead of GMD * Use only one API level 30 * Remove Android SDK setup action * Setup Gradle before AVD * Use x86_64 architecture * Replace deprecated gradle setup action * Downgrade all dependencies again * Run only app android tests * Remove managed devices
100 lines
2.8 KiB
YAML
100 lines
2.8 KiB
YAML
name: Check
|
|
|
|
on: [ pull_request ]
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: ashutoshgngwr/validate-fastlane-supply-metadata@v2
|
|
with:
|
|
fastlaneDir: ./fastlane/metadata/android
|
|
usePlayStoreLocales: true
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v3
|
|
|
|
- name: Setup Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
|
|
- name: Checks
|
|
run: ./gradlew check :app:koverXmlReportRelease :app:koverVerifyRelease
|
|
|
|
- name: SonarCloud
|
|
env:
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
run: ./gradlew sonar
|
|
|
|
- name: Publish test reports
|
|
uses: mikepenz/action-junit-report@v4
|
|
if: always() # always run even if the previous step fails
|
|
with:
|
|
report_paths: './**/build/test-results/**/TEST-*.xml'
|
|
|
|
uiTests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
api-level: [30]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v3
|
|
|
|
- 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: AVD cache
|
|
uses: actions/cache@v4
|
|
id: avd-cache
|
|
with:
|
|
path: |
|
|
~/.android/avd/*
|
|
~/.android/adb*
|
|
key: avd-${{ matrix.api-level }}
|
|
|
|
- name: create AVD and generate snapshot for caching
|
|
if: steps.avd-cache.outputs.cache-hit != 'true'
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: ${{ matrix.api-level }}
|
|
force-avd-creation: false
|
|
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
|
arch: x86_64
|
|
disable-animations: true
|
|
disk-size: 6000M
|
|
heap-size: 600M
|
|
script: echo "Generated AVD snapshot for caching."
|
|
|
|
- name: Run tests
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: ${{ matrix.api-level }}
|
|
force-avd-creation: false
|
|
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
|
arch: x86_64
|
|
disable-animations: true
|
|
disk-size: 6000M
|
|
heap-size: 600M
|
|
script: ./gradlew :app:connectedCheck
|