-
Notifications
You must be signed in to change notification settings - Fork 118
/
.travis.yml
49 lines (41 loc) · 1.57 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
language: java
sudo: required
dist: trusty
jdk: oraclejdk8
before_install:
- wget https://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz
- tar xf apache-maven-3.2.2-bin.tar.gz
- export M2_HOME=$PWD/apache-maven-3.2.2
- export PATH=$M2_HOME/bin:$PATH
#Required to use Codacy
- 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)
addons:
apt:
packages:
- oracle-java8-installer
cache:
directories:
- $HOME/.m2/repository
before_cache:
- rm -f $HOME/.m2/repository/com/torodb
before_script:
- export GIT_BRANCH=$TRAVIS_BRANCH
script: |
if [ "$TRAVIS_EVENT_TYPE" == cron ] && [ "$TRAVIS_BRANCH" == devel ]
then
bash .travis/build-packages
else
mvn -Psafer -Pintegration -B -e -T 1C -Dcheckstyle.consoleOutput=false --update-snapshots verify
fi
after_success:
- |
if [ "$TRAVIS_EVENT_TYPE" != cron ] && [ "$TRAVIS_REPO_SLUG" == torodb/stampede ]
then
# Upload reports to Codecov
bash <(curl -s https://codecov.io/bash) || echo 'Codecov did not collect coverage reports';
# Upload reports to Codacy
java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r reporting/target/site/jacoco-aggregate/jacoco.xml || echo 'Codacy report fail'
else
echo 'Skipping a metrics reports because this repo/build is not permitted'
fi