forked from Radu-Raicea/SignalAndroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (49 loc) · 1.9 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
55
56
# -----------------------------------------------------------------------
# This is the file that Travis CI looks for to test builds. It tells
# Travis what to do before and after running tests, as well as how to
# run the tests.
#
# Typically, this file should not be modified.
# -----------------------------------------------------------------------
language: android
jdk: oraclejdk8
sudo: false
env:
global:
- ANDROID_API=27
- ANDROID_BUILD_TOOLS=27.0.1
- CODACY_PROJECT_TOKEN="c81f43839fa146f68993d9fa7dd9d688"
android:
components:
- tools
- platform-tools
- build-tools-$ANDROID_BUILD_TOOLS
- android-$ANDROID_API
- extra-google-m2repository
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/daemon #Cache daemon logs
- $HOME/.gradle/native #Cache library downloaded from the gradle dependency
- $HOME/.gradle/wrapper #Cache the gradle
- $HOME/.android/build-cache
before_install:
- chmod +x gradlew
- yes | sdkmanager "platforms;android-27"
- sudo apt-get install jq
- wget -O ~/codacy-coverage-reporter-assembly-latest.jar $(curl https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r .assets[0].browser_download_url)
script:
- echo "Travis branch is $TRAVIS_BRANCH"
- echo "Travis branch is in pull request $TRAVIS_PULL+REQUEST"
- ./gradlew assemble
- ./gradlew check jacocoDebugReport
after_success:
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
- java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r build/reports/jacoco/jacocoDebugReport/jacocoDebugReport.xml