keyguard-app-Bitwarden-Vaul.../.github/workflows/check_tests.yaml
2024-12-10 11:55:40 +02:00

50 lines
1.6 KiB
YAML

name: "✔️ Check Tests"
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check-android-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Set up JDK 17"
id: setup-java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- 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: "Prepare env"
run: |
echo ${{ secrets.GOOGLE_SERVICES }} | base64 -d | zcat >> androidApp/google-services.json
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v4
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
- name: "Check and Build licenses"
run: ./gradlew :androidApp:licenseeAndroidPlayStoreRelease
- name: "Move licenses"
run: |
mv -f androidApp/build/reports/licensee/androidPlayStoreRelease/artifacts.json common/src/commonMain/composeResources/files/licenses.json
- name: "Run tests"
id: baseline-profiles
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
arch: x86_64
disable-animations: true
disk-size: 4G
script: |
adb root
./gradlew :androidApp:connectedPlayStoreDebugAndroidTest