1.7.x PAC with claim #792
Workflow file for this run
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: tests | |
on: | |
push: | |
branches: | |
- develop | |
- releases/* | |
pull_request: | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Enable KVM | |
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: Setup Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Test the app (unit test) | |
run: ./gradlew clean test | |
- name: Prepare configuration for integration tests | |
env: | |
CL_URL: ${{ secrets.TESTS_CL_URL }} | |
CL_LGN: ${{ secrets.TESTS_CL_LGN }} | |
CL_PWD: ${{ secrets.TESTS_CL_PWD }} | |
CL_AID: ${{ secrets.TESTS_CL_AID }} | |
APP_KEY: ${{ secrets.TESTS_APP_KEY }} | |
APP_SECRET: ${{ secrets.TESTS_APP_SECRET }} | |
MASTER_SERVER_PUBLIC_KEY: ${{ secrets.TESTS_MASTER_SERVER_PUBLIC_KEY }} | |
ER_URL: ${{ secrets.TESTS_ER_URL }} | |
OP_URL: ${{ secrets.TESTS_OP_URL }} | |
IN_URL: ${{ secrets.TESTS_IN_URL }} | |
run: echo -e tests.sdk.cloudServerUrl="$CL_URL"\\ntests.sdk.cloudServerLogin="$CL_LGN"\\ntests.sdk.cloudServerPassword="$CL_PWD"\\ntests.sdk.cloudApplicationId="$CL_AID"\\ntests.sdk.enrollmentServerUrl="$ER_URL"\\ntests.sdk.operationsServerUrl="$OP_URL"\\ntests.sdk.inboxServerUrl="$IN_URL"\\ntests.sdk.appKey="$APP_KEY"\\ntests.sdk.appSecret="$APP_SECRET"\\ntests.sdk.masterServerPublicKey="$MASTER_SERVER_PUBLIC_KEY" > configs/integration-tests.properties | |
- name: Gradle cache | |
uses: gradle/actions/setup-gradle@v3 | |
- 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: 29 | |
arch: x86_64 | |
target: default | |
profile: Nexus 6 | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: echo "Generated AVD snapshot for caching." | |
- name: Test the app (integration tests) | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
arch: x86_64 | |
target: default | |
profile: Nexus 6 | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./gradlew connectedAndroidTest --info |