Skip to content

Instantly share code, notes, and snippets.

@txusballesteros
Created March 16, 2017 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save txusballesteros/77364320edf9454a8d7edd3a0d4d1b1a to your computer and use it in GitHub Desktop.
Save txusballesteros/77364320edf9454a8d7edd3a0d4d1b1a to your computer and use it in GitHub Desktop.
machine:
environment:
_JAVA_OPTIONS: "-Xms512m -Xmx1024m"
ANDROID_HOME: /usr/local/android-sdk-linux
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,android-25
- echo y | android update sdk --no-ui --all --filter build-tools-25.0.2
- echo y | android update sdk --no-ui --all --filter android-25
- echo y | android update sdk --no-ui --all --filter tools
- echo y | android update sdk --no-ui --all --filter extra-android-m2repository
- echo y | android update sdk --no-ui --all --filter extra-android-support
- echo y | android update sdk --no-ui --all --filter extra-google-google_play_services
- echo y | android update sdk --no-ui --all --filter extra-google-m2repository
override:
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies || true
test:
override:
# start lint
#- ./gradlew lint
# start unit tests
- ./gradlew test
# start the emulator
- emulator -avd circleci-android24 -no-window:
background: true
parallel: true
# wait for it to have booted
- circle-android wait-for-boot
# run tests against the emulator.
- ./gradlew connectedAndroidTest
# copy lint outputs to artifacts
- cp -r app/build/reports/lint-* $CIRCLE_ARTIFACTS
# copy the build outputs to artifacts
- cp -r app/build/outputs/apk/* $CIRCLE_ARTIFACTS
# copy the test results to the test results directory.
- cp -r app/build/outputs/androidTest-results/* $CIRCLE_TEST_REPORTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment