From fba02de06d99c72c44f257e37ff4cb29f7b94d4a Mon Sep 17 00:00:00 2001 From: Fadzli Fadzil Date: Mon, 16 Dec 2024 15:44:11 +0800 Subject: [PATCH] Update sdk_test.yml --- .github/workflows/sdk_test.yml | 35 ++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sdk_test.yml b/.github/workflows/sdk_test.yml index e55d662..fbac95c 100644 --- a/.github/workflows/sdk_test.yml +++ b/.github/workflows/sdk_test.yml @@ -15,6 +15,30 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Touch local properties + run: touch local.properties + + - name: AVD cache + uses: actions/cache@v3 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-29 + + - 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 + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: false + ram-size: 4096M + script: echo "Generated AVD snapshot for caching." + - name: Setup Gradle uses: gradle/gradle-build-action@v2 @@ -28,8 +52,15 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Run unit tests - run: ./gradlew :xendit-android:connectedCheck --info + - name: Run Instrumentation Test + uses: reactivecircus/android-emulator-runner@v2 + with: + emulator-build: 7425822 + api-level: 29 + arch: x86_64 + force-avd-creation: false + ram-size: 4096M + script: ./gradlew connectedQaDebugAndroidTest --stacktrace --no-daemon # notify-slack: # needs: unit-test