-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
.travis.yml
44 lines (37 loc) · 1.47 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
# More details on how to configure the Travis build
# https://docs.travis-ci.com/user/customizing-the-build/
# Speed up build with travis caches
# https://docs.travis-ci.com/user/languages/java/#Caching
before_cache:
# remove cached SNAPSHOT dependencies
- find $HOME/.gradle/caches/modules-2 -name \*-SNAPSHOT -type d -exec rm -rf {} +
# these are changed every build and can't be cached
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -f $HOME/.gradle/caches/modules-2/metadata-*/*.bin
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- rm -fr $HOME/.gradle/caches/*/scripts/
- rm -fr $HOME/.gradle/caches/*/scripts-remapped/
- rm -fr $HOME/.gradle/caches/*/fileHashes/
- rm -fr $HOME/.gradle/caches/transforms-1/transforms-1.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
language: java
jdk:
- openjdk8
#Skipping install step to avoid having Travis run arbitrary './gradlew assemble' task
# https://docs.travis-ci.com/user/customizing-the-build/#Skipping-the-Installation-Step
install:
- true
#Don't build tags
branches:
except:
- /^v\d/
#Build and perform release (if needed)
script:
- ./gradlew build -s && ./gradlew ciPerformRelease
after_success:
#Generates coverage report:
- ./gradlew --stacktrace jacocoTestReport && cp build/reports/jacoco/test/jacocoTestReport.xml jacoco.xml || echo "Code coverage failed"
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"