mirror of
https://github.com/AChep/keyguard-app.git
synced 2025-01-24 19:31:12 +01:00
54 lines
1.9 KiB
YAML
54 lines
1.9 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.KEYSTORE_B64 }} | base64 -d | zcat >> androidApp/keyguard-release.keystore
|
||
|
echo ${{ secrets.KEYSTORE_PROPS_B64 }} | base64 -d | zcat >> androidApp/keyguard-release.properties
|
||
|
echo ${{ secrets.GOOGLE_SERVICES }} | base64 -d | zcat >> androidApp/google-services.json
|
||
|
echo ${{ secrets.SERVICE_ACCOUNT_B64 }} | base64 -d | zcat >> service-account-google.json
|
||
|
python .github/setup_gradle_properties_release.py tag=${{ github.ref_name }}
|
||
|
- 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
|