JdbcMapper/.travis.yml

103 lines
4.3 KiB
YAML

language: java
sudo: required
dist: trusty
env:
global:
- ORACLE_COOKIE=sqldev
- ORACLE_FILE=oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
- ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
- ORACLE_SID=XE
- ORACLE_DOWNLOAD_DIR=$HOME/.traviscache
- DATABASE_NAME=XE
services:
- postgresql
- docker
addons:
mariadb: '10.2'
before_script:
- psql -c 'create database test_db;' -U postgres || travis_terminate 1;
- mysql -u root -e 'CREATE DATABASE IF NOT EXISTS test_db;' || travis_terminate 1;
- if [[ "${JDK}" != 'OpenJDK 6' ]]; then
docker pull microsoft/mssql-server-linux:2017-latest;
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' -p 1433:1433 -d microsoft/mssql-server-linux:2017-latest;
fi
- echo "CREATE USER travis_test IDENTIFIED BY travis_test;" | "$ORACLE_HOME/bin/sqlplus" -L -S / AS SYSDBA || travis_terminate 1;
- echo "grant CREATE SESSION, ALTER SESSION, CREATE DATABASE LINK, CREATE MATERIALIZED VIEW, CREATE PROCEDURE, CREATE PUBLIC SYNONYM, CREATE ROLE, CREATE SEQUENCE, CREATE SYNONYM, CREATE TABLE, CREATE TRIGGER, CREATE TYPE, CREATE VIEW, UNLIMITED TABLESPACE to travis_test;" | "$ORACLE_HOME/bin/sqlplus" -L -S / AS SYSDBA || travis_terminate 1;
script:
- docker ps -a
- mvn -B -pl '!test' clean install || travis_terminate 1;
- mvn -B -pl test clean test '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1;
- mvn -B -pl test clean test --settings .travis-settings.xml -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
- mvn -B -pl test clean test -P unnest '-DjdbcUrl=hsqldb' || travis_terminate 1;
matrix:
include:
- env: JDK='OpenJDK 6'
addons:
apt:
packages:
- openjdk-6-jdk
script:
- mvn -B -pl '!test' clean install || travis_terminate 1;
- mvn -B -pl test clean test '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' || travis_terminate 1;
- mvn -B -pl test clean test --settings .travis-settings.xml -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
- mvn -B -pl test clean test -P unnest '-DjdbcUrl=hsqldb' || travis_terminate 1;
jdk: openjdk6
- env: JDK='OpenJDK 7'
jdk: openjdk7
- env: JDK='OpenJDK 8'
jdk: openjdk8
- env: JDK='OracleJDK 8'
jdk: oraclejdk8
- env: JDK='OpenJDK 9'
install: . ./install-jdk.sh -F 9 -L GPL
- env: JDK='OracleJDK 9'
jdk: oraclejdk9
- env: JDK='OpenJDK 10'
install: . ./install-jdk.sh -F 10 -L GPL
- env: JDK='OracleJDK 10'
install: . ./install-jdk.sh -F 10 -L BCL
- env: JDK='OpenJDK 11'
install: . ./install-jdk.sh -F 11 -L GPL
- env: JDK='OracleJDK 11'
install: . ./install-jdk.sh -F 11 -L BCL
before_install:
- wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh
- wget 'https://github.com/cbandy/travis-oracle/archive/v2.0.3.tar.gz'
- mkdir -p $HOME/.traviscache
- mkdir -p .travis/oracle
- tar x -C .travis/oracle --strip-components=1 -f v2.0.3.tar.gz
- if [[ ! -f $HOME/.traviscache/oracle-xe-11.2.0-1.0.x86_64.rpm.zip ]]; then
.travis/oracle/download.sh;
fi
- .travis/oracle/install.sh
install:
- if [[ "${JDK}" == 'OpenJDK 6' ]]; then
export CUSTOM_MVN_VERION="3.2.5";
echo "Download Maven ${CUSTOM_MVN_VERION}....";
export M2_HOME=$HOME/.traviscache/apache-maven-${CUSTOM_MVN_VERION};
[ -d $M2_HOME ] || wget https://archive.apache.org/dist/maven/maven-3/${CUSTOM_MVN_VERION}/binaries/apache-maven-${CUSTOM_MVN_VERION}-bin.zip;
[ -d $M2_HOME ] || unzip -qq apache-maven-${CUSTOM_MVN_VERION}-bin.zip;
[ -d $M2_HOME ] || mv apache-maven-${CUSTOM_MVN_VERION} $M2_HOME;
export PATH=$M2_HOME/bin:$PATH;
mvn -version;
fi
after_success:
- if [ "${JDK}" == 'OpenJDK 8' ] || [ "${JDK}" == 'OpenJDK 6' ]; then
mvn deploy --settings .travis-settings.xml -DskipTests=true -B || travis_terminate 1;
fi
cache:
directories:
- $HOME/.m2
- $HOME/.traviscache