-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (39 loc) · 1.27 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
language: java
sudo: false
dist: trusty
jdk:
- oraclejdk8
addons:
apt:
packages:
- oracle-java8-installer
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# Display Gradle version instead of letting Travis execute './gradlew assemble' by default
install:
- ./gradlew -version
script:
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
./gradlew check sonarqube -Dsonar.login=$SONAR_LOGIN;
elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN:-}" ]; then
./gradlew check sonarqube -Dsonar.analysis.mode=preview
-Dsonar.login=$SONAR_LOGIN
-Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST
-Dsonar.github.repository=$TRAVIS_REPO_SLUG
-Dsonar.github.oauth=$GITHUB_TOKEN ;
else
./gradlew check;
fi
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/wrapper/
after_success:
- if [ -e ./gradlew ]; then ./gradlew jacocoTestReport;else gradle jacocoTestReport;fi
- bash <(curl -s https://codecov.io/bash) -t 18d9443f-bf82-4d44-9cc6-04e0a0a999c8
notifications:
email: false