forked from fs/android-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
60 lines (54 loc) · 2.3 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
51
52
53
54
55
56
57
58
59
60
machine:
java:
version: oraclejdk8
environment:
TERM: "dumb"
ADB_INSTALL_TIMEOUT: 5000
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
general:
artifacts:
- "/home/ubuntu/android-base/app/build/reports"
dependencies:
pre:
- chmod +x app/set_animation_permissions.sh
- if [ ! -d "/usr/local/android-sdk-linux/platforms/android-26" ]; then echo y | android update sdk --no-ui --all --filter "android-26"; fi
- if [ ! -d "/usr/local/android-sdk-linux/build-tools/26.0.2" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-26.0.2"; fi
- if [ ! -d "/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/design/27.0.1" ]; then echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"; fi
cache_directories:
- /usr/local/android-sdk-linux/platforms/android-26
- /usr/local/android-sdk-linux/build-tools/26.0.2
- /usr/local/android-sdk-linux/extras/android/m2repository
post:
# Create the android emulator
# - echo n | android create avd -n test_android_17 -f -t android-17
# [HINT] Circle-CI already have built-in emulator (circleci-android22), but it's so heavy.
# Make a SD Card image file for the android emulator
# - mksdcard -l e 128M sdcard.img
test:
# pre:
# - emulator -avd test_android_17 -no-audio -no-boot-anim -no-window -sdcard sdcard.img:
# background: true
# parallel: true
override:
- ./gradlew checkstyle lintProductionRelease testProductionReleaseUnitTest
# - circle-android wait-for-boot
# - sleep 20
# - adb shell input keyevent 82
# - adb shell settings put global window_animation_scale 0.0
# - adb shell settings put global transition_animation_scale 0.0
# - adb shell settings put global animator_duration_scale 0.0
# - ./gradlew spoonProductionDebugAndroidTest
post:
- ./gradlew jacocoTestReport
- bash <(curl -s https://codecov.io/bash) -t 4d7a6c7a-f551-49dc-8f68-87697f1b79db
#deployment:
# production: # just a label; label names are completely up to you
# branch: master
# commands:
# - ./gradlew publishApkRelease
# -Dorg.gradle.project.track=production
# beta:
# branch: develop
# commands:
# - ./gradlew publishApkRelease
# -Dorg.gradle.project.track=beta