I am doing detox android e2e on circleci(2.0) and facing two issues -
- circle ci (2) still does not support x86 bases emulators, so I am using ARM based ems
- Its really slow, detox hits a timeout before even the emulator starts / app gets installed, so firebase test lab comes into picture
Is there a way to run android x86 emulators on circleci 2? and Does Detox support running tests on firebase test lab? Is there any documentation around it?
For reference, here is my yaml file for circleci
reference:
android_config: &android_config
docker:
- image: circleci/android:api-28-node8-alpha
download_android_dependencies: &download_android_dependencies
run:
name: Download Android Dependencies
command: |
ls
cd android
./gradlew androidDependencies
cd ../
jobs:
test-android:
<<: *android_config
steps:
- checkout
- run: npm install
- *download_android_dependencies
- run: sdkmanager "system-images;android-25;google_apis;armeabi-v7a"
- run: sdkmanager --licenses
- run: echo "no" | avdmanager create avd -n testEmulator -k "system-images;android-25;google_apis;armeabi-v7a"
- run:
name: Run emulator in background
command: |
sudo apt-get install libpulse0
export ANDROID_SDK_ROOT=${ANDROID_HOME}
export LD_LIBRARY_PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib emulator64-arm -avd testEmulator -noaudio -no-boot-anim -no-window -accel on -verbose -gpu swiftshader
background: true
- run: sudo npm install -g detox-cli
- run:
name: start pkg server
command: npm start
background: true
- run: detox build -c android.emu.debug
- run: detox test -c android.emu.debug -l trace
workflows:
version: 2
build:
jobs:
- test-android