diff --git a/.travis.yml b/.travis.yml index 897a9004b..51896d2c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ os: linux -dist: xenial +dist: bionic language: java jdk: - - openjdk8 + - openjdk11 addons: sonarcloud: @@ -16,8 +16,6 @@ git: services: - docker - - xvfb # required because our frontend tests currently use firefox as a browser (and thus do not run headless) - # see https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-xvfb-to-run-tests-that-require-a-gui for more information cache: directories: - $HOME/.m2 @@ -39,23 +37,14 @@ env: jobs: - DB=H2 - DB=DB2_11_1 - - DB=POSTGRES_10 install: skip - # include SONAR_PROJECT_KEY as a second parameter if this is not a pull request script: ci/test.sh "$DB" "$([ "false" = "$TRAVIS_PULL_REQUEST" ] && echo "$SONAR_PROJECT_KEY")" before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" jobs: include: - - stage: Test - before_script: nvm install $NODE_VERSION - install: skip - env: DB=WEB - script: ci/test.sh "$DB" - before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" - # We are using the environment variable 'MODULE' to force travis into using a different cache for each build. # See https://docs.travis-ci.com/user/caching/#caches-and-build-matrices for detailed information on # which characteristics determine the cache selection. @@ -89,6 +78,19 @@ jobs: script: ci/compile.sh "$MODULE" before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" + - stage: Test + install: skip + env: DB=POSTGRES_10 + script: ci/test.sh "$DB" && export JAVA_HOME=/usr/local/lib/jvm/openjdk8 && ci/test.sh WILDFLY + before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" + + - stage: Test + before_script: nvm install $NODE_VERSION + install: skip + env: DB=WEB + script: ci/test.sh "$DB" + before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" + - stage: Release / Deploy name: release / deploy / commit before_install: | diff --git a/ci/test.sh b/ci/test.sh index a0f579fd5..63e36114b 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -16,6 +16,7 @@ set -e # fail fast #H - POSTGRES_10 #H module: #H - HISTORY +#H - WILDFLY #H sonar project key: #H the key of the sonarqube project where the coverage will be sent to. #H If empty nothing will be sent @@ -52,12 +53,16 @@ function main() { set -x eval "$REL/prepare_db.sh '$1'" ### INSTALL ### - mvn -q install -B -f $REL/.. -P postgres -am -T 4C -pl :taskana-rest-spring-example-wildfly -Dasciidoctor.skip -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip + mvn -q install -B -f $REL/.. -P postgres -am -T 4C -pl :taskana-rest-spring-example-common -Dasciidoctor.skip -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip ### TEST ### mvn -q verify -B -f $REL/.. -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-core + ;; + WILDFLY) + set -x + eval "$REL/prepare_db.sh 'POSTGRES_10'" # Same as above (H2) we can not use the fancy '-f' maven option - (cd $REL/.. && mvn -q verify -B -pl :taskana-rest-spring-example-wildfly -Ddb.type=postgres -Dmaven.javadoc.skip -Dcheckstyle.skip) + (cd $REL/../rest/taskana-rest-spring-example-wildfly && mvn -q verify -B -Ddb.type=postgres) ;; HISTORY) set -x