forked from groupe-sii/ogham
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (64 loc) · 3.04 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
64
65
language: java
dist: trusty
jdk:
#- oraclejdk9
#- openjdk9
- oraclejdk8
- openjdk8
- openjdk7
sudo: required
addons:
apt:
packages:
# - oracle-java8-installer
# - oracle-java9-installer
- graphviz
sonarcloud:
organization: aurelien-baudet-github
branches:
- master
- refactoring/.*
- features/.*
branches:
except:
- test/.*
- gh-.*
before_install:
- echo "MAVEN_OPTS='-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m'" > ~/.mavenrc # see https://github.com/travis-ci/travis-ci/issues/4613
install:
- ./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true -Dskip.integration.tests=true -Dskip.unit.tests=true -B -q
# generate projects used to test the classpath on the current Ogham version
- MVN_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
- ./mvnw spring-boot:run -pl :ogham-test-classpath -Drun.arguments="$HOME/classpath-tests" -Drun.jvmArguments="-Dogham-version=$MVN_VERSION -Dspring.initializer.url=$SPRING_INITIALIZER_URL"
- ls -l "$HOME"
- ls -l "$HOME/classpath-tests"
script:
- ./mvnw test verify -Dmaven.test.redirectTestOutputToFile=true -fae -B -q
- ./mvnw javadoc:javadoc -fae -B | grep -Ei '(error|warn)'
# execute generated classpath tests for the right java version
- set -o pipefail
- TEST_FOLDER=$(java -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*"/JAVA_\2/p;')
- echo $TEST_FOLDER
- ls -l "$HOME"
- ls -l "$HOME/classpath-tests"
- ls -l "$HOME/classpath-tests/$TEST_FOLDER"
- $HOME/classpath-tests/$TEST_FOLDER/./mvnw test -T 2.5C -f "$HOME/classpath-tests/$TEST_FOLDER/pom.xml" -Dmaven.test.redirectTestOutputToFile=true -fae -q -B | grep -Ei '(error|exception|Tests run:)'
# TODO: after error -> grab logs and send it
after_success:
- ./mvnw sonar:sonar -B | grep -Ei '(warn|error|ANALYSIS SUCCESSFUL)'
- ./mvnw deploy --settings .travis-settings.xml -DskipTests=true -B | grep -Ei '(Uploading|Downloading|Uploaded|Downloaded)'
notifications:
slack:
rooms:
- secure: NdaSwFJ16HC93H1iimYB07/0rGwQfVCto2/XLrVJNeMcvdRsHbuhBnKwwUkNCTLeLLtB1DVmoNeCBdo2pmtAvoyTnl9OXhG3GWjoB++Al+/66x/TzC1g891y59JI/F7btVqZRKMi5URdcXt7VqSTUyu3Qjf6rxxeRMfiCgg4eLP2ABWQTvNpi7AgV9ArkVqat5Fo1p98iuxpUL0kByXmyuoN15f0azVm0Mhwv2LtMyHAf5Lq1gKOt7TfKccMEJaZXPZMfFWkXblZUWggx6EYXB2ylXJ7e45UeunsroqPYuXJtepwOjcT00NSm7tR+wDaVZl3hXDfexwb35wP+g/tcIiQYTWgQQvr5b6Z0tUX3WgZt7aBMH9gaJPRolC7FXwukXkdBwjvyDLsra147M2pm7fc5zj73TV0gaEdqDewd+UgFA12Vm1gwC0eWH/HVhOZ0HGOQdYmtYkZJ67KTwes9B+SKDkrSF4Nq7T3svOWvGxzDCaw4CCOBY5U1xRc3VVOo/xtFa8dAKfxpo0IFy/qaHS4vIb2BDHJ0LU7+WarcjcmADxJXvhvOvvByS5k0sqkUXF4uB+QpxQqQEGNMzLC2iMog0UnBIIEZEe6pvrzchoQIpKyom4GvnAi+Xco8aJaMgrLZY9JwmlLP8r1YFyMawH4kmJ8XpPZ5+fIN2HSkD4=
template:
- "branch %{branch} %{result}"
- "Build: <%{build_url}|#%{build_number}> (%{duration})"
- "Commit: <%{compare_url}|%{commit}> by %{author}"
- "%{commit_message}"
cache:
directories:
- $HOME/classpath-tests
- $HOME/.m2
before_cache:
- rm -rf $HOME/.m2/repository/fr/sii