mirror of
https://github.com/AChep/keyguard-app.git
synced 2025-01-08 20:51:39 +01:00
50 lines
1.6 KiB
YAML
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
|