react-native/circle.yml

37 lines
1.5 KiB
YAML
Raw Normal View History

machine:
node:
version: 5.1.0
environment:
PATH: "~/$CIRCLE_PROJECT_REPONAME/gradle-2.9/bin:$PATH"
TERM: "dumb"
ADB_INSTALL_TIMEOUT: "10"
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx512m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
pre:
- npm install -g npm@3.2
- wget "https://services.gradle.org/distributions/gradle-2.9-bin.zip"; unzip gradle-2.9-bin.zip
test:
pre:
# starting emulator in advance because it takes very long to boot
# the side effect is that we loose 1GB of RAM for all the following commands
# if builds are running out of memory move the emulator start right before `wait-for-boot`
- emulator -avd circleci-android22 -no-audio -no-window:
background: true
parallel: true
override:
# build ndkreactlib first because it consumes memory and downloads stuff
- ./gradlew :ReactAndroid:buildReactNdkLib -PdisablePreDex -Pjobs=1
# unit tests
- ./gradlew :ReactAndroid:testDebugUnitTest -PdisablePreDex
# build JS bundle for instrumentation tests
- node local-cli/cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/androidTest/assets/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
# run instrumentation tests on device
- circle-android wait-for-boot
- sleep 5
# unlock the emulator screen
- adb shell input keyevent 82
- sleep 5
# run tests on the emulator
- ./gradlew :ReactAndroid:connectedAndroidTest -PdisablePreDex --stacktrace