Skip to content

Instantly share code, notes, and snippets.

@tugceaktepe
Created June 18, 2023 14:26
Show Gist options
  • Save tugceaktepe/a9b20b7485be6a4a0a6431c6ff347487 to your computer and use it in GitHub Desktop.
Save tugceaktepe/a9b20b7485be6a4a0a6431c6ff347487 to your computer and use it in GitHub Desktop.
run emulator with docker-image
image: registry.xxx.yy-qemu-enabled-image
stages:
- test
instrumentedTests:
stage: test
script:
# create the emulator
- echo no | avdmanager create avd -n test -k "system-images;android-${EMULATOR_VERSION};default;x86_64"
# for some reasons the emulator doesnt start automatically, so we have to start it
- adb start-server
# run in the background without window and audio
- chmod +x ./gradlew
- emulator -avd test -no-window -no-audio &
- ./android-wait-for-emulator
- adb shell input keyevent 82
- adb devices
- ./gradlew connectedDebugAndroidTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment