Merge pull request #270 from flauschtrud/l10n_master #830
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: Android CI | |
on: | |
push | |
jobs: | |
build: | |
name: Test & Build | |
runs-on: ubuntu-latest | |
steps: | |
- 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 | |
ls /dev/kvm | |
- name: Check Out Repository | |
uses: actions/checkout@v4 | |
- name: Set Up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Run Unit Tests | |
if: ${{ !contains(github.ref, 'l10n_master') }} | |
run: bash ./gradlew testFdroidDebugUnitTest | |
- name: Accept Licenses | |
if: ${{ !contains(github.ref, 'l10n_master') }} | |
run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses || true | |
- name: Run UI Tests | |
if: ${{ !contains(github.ref, 'l10n_master') }} | |
run: bash ./gradlew allDevicesFdroidDebugAndroidTest -Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true -Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1 -Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=180 | |
- name: Assemble App Debug APK | |
run: ./gradlew assembleDebug | |
- name: Upload App Play APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-play-debug | |
path: app/build/outputs/apk/play/debug/app-play-debug.apk | |
- name: Upload App F-Droid APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-fdroid-debug | |
path: app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk |