forked from citiususc/calendula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
60 lines (60 loc) · 2.41 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
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-25-alpha
environment:
JAVA_OPTS: "-Xms512m -Xmx2048m"
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "Calendula/build.gradle" }}
# - run:
# name: Install AVD
# command: |
# sdkmanager "system-images;android-25;google_apis;armeabi-v7a"
# echo no | avdmanager create avd --name test -k "system-images;android-25;google_apis;armeabi-v7a"
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "Calendula/build.gradle" }}
- run:
name: Build
command: ./gradlew assembleCiDebug
- run:
name: Run Unit Tests
command: ./gradlew testCiDebugUnitTest
- store_artifacts:
path: Calendula/build/reports/
destination: reports
- store_test_results:
path: Calendula/build/test-results
# - run:
# name: Launch Android 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
# - run:
# name: Wait For Emulator Bootup
# command: |
# circle-android wait-for-boot
# sleep 15
# adb shell input keyevent 82
# - run:
# name: Run Integration Tests
# command: ./gradlew connectedCiDebugAndroidTest --no-daemon
# - run:
# name: Generate Coverage Report
# command: ./gradlew jacocoTestReportCiDebug --no-daemon
# - store_artifacts:
# path: Calendula/build/reports/
# destination: reports
# - run:
# name: Report coverage
# command: |
# wget 'https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/2.0.2/codacy-coverage-reporter-2.0.2-assembly.jar' -O coverage-reporter.jar
# java -cp coverage-reporter.jar com.codacy.CodacyCoverageReporter -l Java -r Calendula/build/reports/jacoco/ciDebug/jacoco.xml