diff --git a/.github/workflows/unit-and-instrumented-tests-action.yml b/.github/workflows/unit-and-instrumented-tests-action.yml index 0ed614b1c..f91306c19 100644 --- a/.github/workflows/unit-and-instrumented-tests-action.yml +++ b/.github/workflows/unit-and-instrumented-tests-action.yml @@ -40,15 +40,15 @@ jobs: # create an emulator with google apis, runs on java 8 - name: Create Android emulator run: | - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --licenses - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-"$API_MIN";google_apis;x86_64" - echo "no" | $ANDROID_HOME/tools/bin/avdmanager --verbose create avd --force --name test --package "system-images;android-"$API_MIN";google_apis;x86_64" + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-"$API_MIN";google_apis;x86_64" + echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager --verbose create avd --force --name test --package "system-images;android-"$API_MIN";google_apis;x86_64" # boots and waits for the emulator to be ready - name: Launch Emulator timeout-minutes: 30 run: | echo "Starting emulator and waiting for boot to complete." - nohup $ANDROID_HOME/tools/emulator -avd test -no-audio -no-boot-anim -camera-back none -camera-front none -qemu -m 2048 2>&1 & + nohup $ANDROID_HOME/cmdline-tools/latest/emulator -avd test -no-audio -no-boot-anim -camera-back none -camera-front none -qemu -m 2048 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do echo "waiting..."; sleep 1; done; input keyevent 82' echo "Emulator has finished booting" # repo's gradle is configured to run on java 17 @@ -80,15 +80,15 @@ jobs: # create an emulator with google apis, runs on java 8 - name: Create Android emulator run: | - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --licenses - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-"$API_MIN";google_apis;x86_64" - echo "no" | $ANDROID_HOME/tools/bin/avdmanager --verbose create avd --force --name test --package "system-images;android-"$API_MIN";google_apis;x86_64" + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-"$API_MIN";google_apis;x86_64" + echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager --verbose create avd --force --name test --package "system-images;android-"$API_MIN";google_apis;x86_64" # boots and waits for the emulator to be ready - name: Launch Emulator timeout-minutes: 30 run: | echo "Starting emulator and waiting for boot to complete." - nohup $ANDROID_HOME/tools/emulator -avd test -no-audio -no-boot-anim -camera-back none -camera-front none -qemu -m 2048 2>&1 & + nohup $ANDROID_HOME/cmdline-tools/latest/emulator -avd test -no-audio -no-boot-anim -camera-back none -camera-front none -qemu -m 2048 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do echo "waiting..."; sleep 1; done; input keyevent 82' echo "Emulator has finished booting" # repo's gradle is configured to run on java 17 @@ -138,16 +138,16 @@ jobs: # create an emulator with google apis, runs on java 8 - name: Create Android emulator run: | - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --licenses - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-"$API_CURRENT";google_apis_playstore;x86_64" - echo "no" | $ANDROID_HOME/tools/bin/avdmanager list device - echo "no" | $ANDROID_HOME/tools/bin/avdmanager --verbose create avd --force --name test --package "system-images;android-"$API_CURRENT";google_apis_playstore;x86_64" + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-"$API_CURRENT";google_apis_playstore;x86_64" + echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager list device + echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager --verbose create avd --force --name test --package "system-images;android-"$API_CURRENT";google_apis_playstore;x86_64" # boots and waits for the emulator to be ready - name: Launch Emulator timeout-minutes: 30 run: | echo "Starting emulator and waiting for boot to complete." - nohup $ANDROID_HOME/tools/emulator -avd test -no-audio -no-boot-anim -camera-back none -camera-front none -qemu -m 2048 2>&1 & + nohup $ANDROID_HOME/cmdline-tools/latest/emulator -avd test -no-audio -no-boot-anim -camera-back none -camera-front none -qemu -m 2048 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do echo "waiting..."; sleep 1; done; input keyevent 82' echo "Emulator has finished booting" # repo's gradle is configured to run on java 17