-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
50 lines (49 loc) · 1.71 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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: 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: 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