From 8adbf09f03c60b57e705f5e80643e8cb9ea06622 Mon Sep 17 00:00:00 2001 From: Mansi Pandya Date: Thu, 2 May 2024 10:15:55 -0400 Subject: [PATCH] update create adb devcie command into yml file for Instrumented Tests --- .github/workflows/pull-request.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 45b40223d..cbd4582a9 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -30,18 +30,6 @@ jobs: run: adb devices - name: Restart ADB server run: adb kill-server && adb start-server - - name: Wait for emulator to boot - run: | - boot_completed="" - while [[ "$boot_completed" != "1" ]]; do - boot_completed=$(adb shell getprop sys.boot_completed | tr -d '\r') - sleep 5 - done - - name: Execute adb command - run: | - adb shell getprop sys.boot_completed - - name: Start emulator - run: /Users/runner/Library/Android/sdk/emulator/emulator -avd test -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none & - name: create AVD and generate snapshot for caching if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0 @@ -52,7 +40,14 @@ jobs: force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: false - script: echo "Generated AVD snapshot for caching." + script: | + echo "Generated AVD snapshot for caching." + adb start-server # Start the ADB server + boot_completed="" + while [[ "$boot_completed" != "1" ]]; do + boot_completed=$(adb shell getprop sys.boot_completed | tr -d '\r') + sleep 5 + done - name: "Run Instrumented Tests" uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0 with: