-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
54 lines (50 loc) · 2.36 KB
/
.travis.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
before_install:
- yes | sdkmanager "platforms;android-28"
- yes | sdkmanager "build-tools;28.0.3"
language: android
android:
components:
- tools
- tools # ref: https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943)
- platform-tools
- build-tools-28.0.3
- android-28
- android-22
- extra-android-support
# emulator images
- sys-img-armeabi-v7a-android-22
licenses:
- 'android-sdk-license-.+'
jdk:
- oraclejdk8
# Emulator Management: Create, Start and Wait
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
# anything later than android-22 will stall
# ref: https://github.com/travis-ci/travis-ci/issues/8188
- echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
after_success:
#unit test coverage
- ./gradlew jacocoTestReportDebug
#android test coverage
- ./gradlew createDebugCoverageReport
#coveralls reporting
- ./gradlew coveralls
#codecov reporting
- bash <(curl -s https://codecov.io/bash)
#Code Climate coverage reporting
- export JACOCO_SOURCE_PATH="app/src/main/java/ app/src/debug/java/ app/build/generated/source/apt/debug/"
- ./cc-test-reporter format-coverage -t jacoco -o app/build/reports/jacoco/debug/jacoco.json app/build/reports/jacoco/debug/jacoco.xml
- ./cc-test-reporter format-coverage -t jacoco -o app/build/reports/coverage/debug/report.json app/build/reports/coverage/debug/report.xml
- ./cc-test-reporter sum-coverage -o app/build/reports/climatecoverage.json -p 2 app/build/reports/jacoco/debug/jacoco.json app/build/reports/coverage/debug/report.json
- ./cc-test-reporter upload-coverage -i app/build/reports/climatecoverage.json
#Codacy coverage reporting
- wget https://github.com/codacy/codacy-coverage-reporter/releases/download/4.0.3/codacy-coverage-reporter-4.0.3-assembly.jar -O codacy-coverage-reporter.jar
- java -jar codacy-coverage-reporter.jar report -l Java -r app/build/reports/jacoco/debug/jacoco.xml --partial
- java -jar codacy-coverage-reporter.jar report -l Java -r app/build/reports/coverage/debug/report.xml --partial
- java -jar codacy-coverage-reporter.jar final