You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

96 lines
2.6 KiB

version: 2
jobs:
node:
working_directory: ~/rn-dp
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache:
key: yarn-v1-{{ checksum "example/yarn.lock" }}-{{ arch }}
- restore_cache:
key: node-v1-{{ checksum "example/package.json" }}-{{ arch }}
- run: cd example && yarn install
- save_cache:
key: yarn-v1-{{ checksum "example/yarn.lock" }}-{{ arch }}
paths:
- ~/.cache/yarn
- save_cache:
key: node-v1-{{ checksum "example/package.json" }}-{{ arch }}
paths:
- example/node_modules
- persist_to_workspace:
root: ~/rn-dp
paths:
- example/node_modules
android:
working_directory: ~/rn-dp/example/android
docker:
- image: circleci/android:api-27-node8-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout:
path: ~/rn-dp
- attach_workspace:
at: ~/rn-dp
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Cd
command: cd .. && ls -la
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Setup emulator
command: sdkmanager "system-images;android-16;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-16;default;armeabi-v7a"
- run:
name: Launch emulator
command: export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib && emulator64-arm -avd test -noaudio -no-boot-anim -no-window -accel auto -verbose
background: true
- run:
name: Wait emulator
command: |
# start the emulator
- emulator -avd circleci-android22 -no-audio -no-window:
background: true
parallel: true
# wait for it to have booted
circle-android wait-for-boot
# unlock the emulator screen
sleep 30
adb shell input keyevent 82
./gradlew connectedAndroidTest -PdisablePreDex
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results
workflows:
version: 2
node-android:
jobs:
- node
- android:
requires:
- node