forked from iotaledger/iri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (54 loc) · 3.51 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
57
58
59
60
61
62
63
language: java
dist: trusty
jdk:
- oraclejdk8
- openjdk8
- oraclejdk9
cache:
apt: true
directories:
- $HOME/.m2
sudo: required
addons:
apt:
packages:
- jq
matrix:
allow_failures:
- jdk: oraclejdk9
script:
#run tests and integration tests
# see https://stackoverflow.com/questions/34405047/how-do-you-merge-into-another-branch-using-travis-with-git-commands?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
- build_head=$(git rev-parse HEAD)
- git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
- git fetch origin $TRAVIS_BRANCH
- git checkout -f $TRAVIS_BRANCH
- git checkout $build_head
- git merge $TRAVIS_BRANCH
- VERSION=$(mvn help:evaluate -Dexpression=project.version | grep -E '^[0-9.]+')
- echo $VERSION
#run jar sanity tests
- mvn integration-test -Dlogging-level=INFO
#jacoco prep (appends to mvn run)
- JACOCO_V=$(mvn help:evaluate -Dexpression=jacoco.version | grep -E '^[0-9.]+')
- export _JAVA_OPTIONS="$_JAVA_OPTIONS -javaagent:$HOME/.m2/repository/org/jacoco/org.jacoco.agent/$JACOCO_V/org.jacoco.agent-$JACOCO_V-runtime.jar=destfile=$PWD/target/jacoco.exec,output=file,append=true,dumponexit=true"
- echo $_JAVA_OPTIONS
- git clone https://github.com/iotaledger/iri-regression-tests.git
- cd iri-regression-tests
- git checkout -f master
- mkdir iri
- cp -rf ../target iri/target
- bash run_all_stable_tests.sh $VERSION
- cd ..
#jacoco append to report
- mvn jacoco:report
after_success:
#digest of packaged jar
- test $TRAVIS_JDK_VERSION = "oraclejdk8" && sha256sum target/*.jar*
#codacy-coverage send report. Uses Travis Env variable (CODACY_PROJECT_TOKEN)
- test $TRAVIS_PULL_REQUEST = "false" && test $TRAVIS_JDK_VERSION = "oraclejdk8" && 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')
- test $TRAVIS_PULL_REQUEST = "false" && test $TRAVIS_JDK_VERSION = "oraclejdk8" && java -jar codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/site/jacoco/jacoco.xml
env:
global:
- secure: oJutGSe5KK3ymwSvohFZ89UL7XaNlXH6fdO2nBEYbk5KyYuQ1Wm+h6+N/05EbwxwDK9dEiF73ZJh76sZ3IWKjRC8VWjUAz+8p38hGvQwByrVsJkrbs5SA4wA4XnyvEqyMV3yqbcgRNbMlIvj7ubUbxMizz7MA7plnumrnx9ejPG1WP4rNgzUA3XcBWHdITyOSg9rSMBJzMZ9CN1Dv+1SxZV+GlkyWN8n1Cshkq2TnNl1oRZqGKs7O0ma1dN0hUKtBa80AsCTjH8ojZFJU92gmkvAWDw5BTSZ8mhX9sZcbBYT8SnQxNDrf51HJ+K7hvdpFbsy5Z0g24cNJkA8lfUnzXFznZ/PH4hm8MeVWjRiWdE4VZr47iYzJcs0brOHSeab6fBoeTPS5899Q3V+yAw6CahfvOBthuF3Ymy+fZXoDO5242PSWXXsGwFqK7r/gT0iwJZxMBI/UUWsP/s7J/CWux8ftwbOdSbs4XdQZsuqxzKEKDDwU0FTytantsMS/vcgI41K5azyY4tbkixzydaBPvhimkflaWcuZb//mXcntitgyenaSwfkLX5pD5l1srVzSliyabnH7AprLOm1B9DBfk2leI2XgGJg/Q/GrVtcjcl1FU0aXBFhLrp3BkK7chlG2v/Eacr8Pb6NOQHORyq64n2prF6zvExX0aadOddefoA=
- secure: HfmR15dSUnVLXtYzqE8Rq6STPunSNWpKTipNim79SZ+KE/pJpRQCpcRpePCzjdGAOfEOo6JyCoT0AeYkES+QU59hoKZPa8TLv+X+8YRW4CSn3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