-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (43 loc) · 1.71 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
# tell Travis it's Java -- that'll allow us to pick multiple JDK versions, preinstalls a few dev tools, ...
# see https://docs.travis-ci.com/user/languages/java/ for more information
language: java
# we build on the latest (available on Travis) Ubuntu LTS
dist: bionic
# we test against Java 10 and 11 by default
# Java 8 might be too old, but we can always include it into our build matrix
jdk:
- openjdk8
- openjdk10
- openjdk11
# a special Java 8 configuration to build a .jar and upload it somewhere
matrix:
include:
- name: "Build and upload .jar (uploads for master builds and tags only, Java 8)"
jdk: openjdk8
script:
- cd cloud.foundry.cli
- ./gradlew jar
after_success:
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
# upload to alternative location unless on master branch (or building a tag)
- |2
if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ] || [ "$TRAVIS_BRANCH" != "master" ] && [ "$TRAVIS_TAG" == "" ]; then
echo "Uploads to transfer.sh disabled for performance reasons"
else
bash upload.sh build/libs/cf-control.jar
fi
- name: "Run all tests (including system tests) and report coverage (Java 8)"
# Really, coveralls plugin? You don't work with Java 11?
# https://github.com/kt3k/coveralls-gradle-plugin/issues/85
jdk: openjdk8
script:
- cd cloud.foundry.cli
- ./gradlew jacocoTestReport coveralls
script:
# our source code is currently in a subdirectory
- cd cloud.foundry.cli
- ./gradlew buildWithoutSystemTests
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)/