Skip to content
This repository was archived by the owner on Oct 10, 2020. It is now read-only.

anthonymonori/android-ci-emulator-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

android-ci-emulator-image

Container set up with build tools in order to run Android connected builds in a Docker setup.

Contains

Usage

Including this in your ci.yml

image: anthonymonori/android-ci-emulator-image:latest

Note: Currently supporting Travis CI and GitLab CI.

Creating a docker container

docker login
docker pull anthonymonori/android-ci-emulator-image:latest
docker run -it -d -p <port>:<port-internal> --name <container-name> anthonymonori/android-ci-emulator-image:latest

Note: of course, you need to change [port],[port-internal],[container-name] to run the above command lines. You also might want to enable the [port] variable on whatever cloud solutions you are running.

Running androidConnectedTest

In your .gitlab-ci.yml file, add the following lines to ensure the virtual devices are started up:

before_script:
- /opt/scripts/create-devices.sh
- cd $ANDROID_HOME/tools && emulator -avd [AVD-NAME] -wipe-data -netfast -no-boot-anim -no-audio -no-snapshot -bootchart 120
- /opt/scripts/android-wait-for-emulator.sh
- adb shell input keyevent 82

Possible device names:

  • Nexus6P
  • Nexus10

For the full list, please see create-devices.sh

Build image

docker build .

Deploy image

docker push anthonymonori/android-ci-emulator-image

Problems

Use the Issues tab above.

About

Just like anthonymonori/android-ci-image but with emulators!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages