Skip to content

Commit

Permalink
CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
timonback committed Oct 7, 2017
1 parent c026513 commit 254aad1
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-25-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- run:
name: Available emulators
command: sdkmanager --list --verbose | grep system-images
- run:
name: Setup emulator
command: sdkmanager "system-images;android-24;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-24;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 on
background: true

- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Install screenshot gradle lib
command: |
mkdir ~/gradle-screenshot-lib
git clone https://github.com/facebook/screenshot-tests-for-android ~/gradle-screenshot-lib
cd ~/gradle-screenshot-lib
~/gradle-screenshot-lib/gradlew installAll
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Run dry tests
command: ./gradlew lint test assembleRelease
- run:
name: Wait for emulator
command: circle-android wait-for-boot
- run:
name: Run emulator tests
command: ./gradlew connectedAndroidTest
- run:
name: Take screenshots
command: ./gradlew screenshotTests
- run:
name: Build apk
command: ./gradlew assembleRelease
- store_artifacts:
path: app/build/outputs
destination: outputs
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results

0 comments on commit 254aad1

Please sign in to comment.