Skip to content

Commit

Permalink
update create adb devcie command into yml file for Instrumented Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi-mParticle committed May 2, 2024
1 parent 8bcfea8 commit 8adbf09
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 8adbf09

Please sign in to comment.