This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (38 loc) · 3.87 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
language: java
sudo: required
# necessary in order to avoid killing of certain tests because of memory consumption (not sure why adding `sudo: required` changes this)
# specifying other dists doesn't make sense because `trusty` doesn't have `oraclejdk8` (fails due to `Sorry, but JDK '[oraclejdk8]' is not known.`) which is the only supported JDK currently. Testing on Mac OSX doesn't make too much sense since it will run the same `maven` based build routine.
jdk:
- oraclejdk8
# `openjdk8` not available
env:
- MAVEN_OPTS="-Xmx8g -Xms2g"
before_install:
# previous meanwhile unused dependency `javaocr` needs Maven 3.1.1, but this version ignores mirror settings in $HOME/.m2/setting.xml (which 3.3.9 doesn't)
- sudo apt-get update
- sudo apt-get install --yes genisoimage
# necessary for `sh.tak.appbundler:appbundle-maven-plugin:1.2.0:bundle`
- sudo apt-get install --yes fakeroot
- sudo apt-get install libaio1 libaio-dev
# avoid `libaio.so.1: cannot open shared object file: No such file or directory`
- wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz
- tar xf mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz && mv mysql-5.7.17-linux-glibc2.5-x86_64 $HOME/mysql-5.7.17
# for integration tests
- git clone https://github.com/krichter722/maven-parent && cd maven-parent && mvn install && cd ..
install: /bin/true
script:
- sudo service postgresql stop
- sudo service mysql stop
# avoid conflict which instance started by integration tests (`mysql-server` and `mysqld` are unrecognized services)
- sudo netstat -tupln
# debug conflicting port for integration tests
- echo -e '<?xml version="1.0" encoding="UTF-8"?>\n<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"\n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n <mirrors>\n <mirror>\n <id>mvnsearch-unavailable</id>\n <name>mvnsearch-unavailable</name>\n <mirrorOf>mvnsearch</mirrorOf>\n <url>http://repo1.maven.org/maven2</url>\n </mirror>\n </mirrors>\n <profiles>\n <profile>\n <id>no-mvnsearch</id>\n <repositories>\n <repository>\n <id>mvnsearch</id>\n <url>http://www.mvnsearch.org/maven2</url>\n <releases>\n <enabled>true</enabled>\n </releases>\n <snapshots>\n <enabled>true</enabled>\n </snapshots>\n </repository>\n </repositories>\n </profile>\n </profiles>\n <activeProfiles>\n <activeProfile>no-mvnsearch</activeProfile>\n </activeProfiles>\n</settings>' > $HOME/.m2/settings.xml
# works around unavailable http://www.mvnsearch.org/maven2 which causes `The job exceeded the maximum time limit for jobs, and has been terminated.` on Travis CI and might be fixed in newer versions of transitive dependencies, but it's more reliable to restrict access to it
- cat $HOME/.m2/settings.xml
- env MAVEN_OPTS="-Xmx8g -Xms2g" mvn install --update-snapshots -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version && mvn test verify --batch-mode
# - `--batch-mode` is necessary in order to avoid excessive updates during Maven artifact downloads which quickly exceed the Travis CI log size limit of 4MB which causes the build to fail
# - redirection of rather unimportant commands like `mvn validate` and displaying the output in the `on_failure` part of the scriopt doesn't work if a command hangs to `/tmp/validate.log` because then `after_failure` isn't run
after_success:
- cd document-scanner-parent && mvn -DforkCount=1 clean org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report && cd ..
- cd refletion-form-builder-parent && mvn -DforkCount=1 clean org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report && cd ..
- mvn org.eluder.coveralls:coveralls-maven-plugin:report