JdbcMapper/.travis.yml

141 lines
8.0 KiB
YAML
Raw Normal View History

2018-03-23 00:54:00 -04:00
language: java
2018-05-16 01:34:36 -04:00
sudo: required
2018-03-23 00:54:00 -04:00
dist: trusty
2018-04-19 01:08:01 -04:00
2018-05-17 00:43:49 -04:00
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
2018-05-17 01:47:42 -04:00
- ORACLE_DOWNLOAD_DIR=$HOME/.traviscache
- DATABASE_NAME=XE
2018-05-17 00:43:49 -04:00
2018-05-15 22:41:02 -04:00
services:
- postgresql
2018-05-16 01:34:36 -04:00
- docker
2018-05-15 22:41:02 -04:00
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;
2018-05-17 00:43:49 -04:00
- 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;
2018-05-15 22:41:02 -04:00
2018-05-16 01:34:36 -04:00
script:
- mvn -v
# java8+ supports everything
- ./test/runSnapshotTests.sh --offline || travis_terminate 1;
# everything against BIND
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1;
# everything against BIND jdbcMapper, but OPTIMAL queryMapper
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1;
# h2 and postgre against ANY
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=h2' '-DjdbcUrl1=jdbc:postgresql:test_db' || travis_terminate 1;
# oracle against ORACLE
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ORACLE -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
# hsql against UNNEST
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1;
2018-05-15 22:41:02 -04:00
2018-04-19 01:08:01 -04:00
matrix:
include:
2018-09-25 23:35:44 -04:00
- env: JDK='OpenJDK 6'
addons:
apt:
packages:
- ca-certificates-java
- openjdk-7-jre-headless
script:
# java6 doesn't support ms-sql at all, and doesn't support h2 with ANY
- mvn -v
- ./test/runSnapshotTests.sh --offline || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
2018-09-25 23:35:44 -04:00
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=jdbc:postgresql:test_db' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ORACLE -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
2018-09-25 23:35:44 -04:00
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1;
2018-04-19 01:08:01 -04:00
- env: JDK='OpenJDK 7'
jdk: openjdk7
script:
# java7 doesn't support h2 with ANY
- mvn -v
- ./test/runSnapshotTests.sh --offline || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=BIND -DqueryMapper.databaseType=OPTIMAL -P oracle '-DjdbcUrl1=jdbc:postgresql:test_db' '-DjdbcUrl2=jdbc:mariadb://127.0.0.1:3306/test_db?user=root' '-DjdbcUrl3=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' '-DjdbcUrl4=jdbc:sqlserver://localhost:1433;databaseName=master;username=sa;password=<YourStrong!Passw0rd>;' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ANY '-DjdbcUrl=jdbc:postgresql:test_db' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=ORACLE -P oracle '-DjdbcUrl=jdbc:oracle:thin:travis_test/travis_test@127.0.0.1:1521/xe' || travis_terminate 1;
- mvn --offline -B -pl test clean test -DjdbcMapper.databaseType=UNNEST '-DjdbcUrl=hsqldb' || travis_terminate 1;
2018-04-19 01:08:01 -04:00
- 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='OpenJDK 11'
install: . ./install-jdk.sh -F 11 -L GPL
- env: JDK='OpenJDK 12'
install: . ./install-jdk.sh -F 12 -L GPL
- env: JDK='OpenJDK 13'
install: . ./install-jdk.sh -F 13 -L GPL
- env: JDK='OpenJDK 14'
install: . ./install-jdk.sh -F 14 -L GPL
2020-03-31 21:34:06 -04:00
- env: JDK='OpenJDK 15'
install: . ./install-jdk.sh -F 15 -L GPL
2018-04-19 01:08:01 -04:00
2018-05-16 01:34:36 -04:00
before_install:
- mv .travis/settings.xml $HOME/.m2/settings.xml
2018-05-16 01:34:36 -04:00
- wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh
2018-05-17 01:47:42 -04:00
- mkdir -p $HOME/.traviscache
- if [[ "${JDK}" == 'OpenJDK 6' ]]; then
[ -f $HOME/.traviscache/jdk6-6u45-6-x86_64.pkg.tar.xz ] || wget -q -O$HOME/.traviscache/jdk6-6u45-6-x86_64.pkg.tar.xz https://www.moparisthebest.com/jdk6-6u45-6-x86_64.pkg.tar.xz;
sudo tar xJvf $HOME/.traviscache/jdk6-6u45-6-x86_64.pkg.tar.xz -C /;
export JAVA_HOME=/usr/lib/jvm/java-6-jdk;
fi
- if [ ! -f $HOME/.m2/repository/org/sonatype/oss/oss-parent/9/oss-parent-9.pom ]; then
set -euxo pipefail;
wget -q -O- https://github.com/moparisthebest/travis-ci-cache/raw/master/repository.tar.gz | tar xzf - -C $HOME/.m2/;
set +euxo pipefail;
fi
- .travis/oracle/download.sh
2018-05-17 01:47:42 -04:00
- .travis/oracle/install.sh
2018-03-23 00:54:00 -04:00
install:
2018-04-19 01:08:01 -04:00
- if [[ "${JDK}" == 'OpenJDK 6' ]]; then
2018-05-17 00:43:49 -04:00
export CUSTOM_MVN_VERION="3.2.5";
2018-03-23 00:54:00 -04:00
echo "Download Maven ${CUSTOM_MVN_VERION}....";
2018-05-17 01:47:42 -04:00
export M2_HOME=$HOME/.traviscache/apache-maven-${CUSTOM_MVN_VERION};
2018-09-25 23:35:44 -04:00
[ -d $M2_HOME ] || wget -q https://archive.apache.org/dist/maven/maven-3/${CUSTOM_MVN_VERION}/binaries/apache-maven-${CUSTOM_MVN_VERION}-bin.zip;
2018-05-17 01:47:42 -04:00
[ -d $M2_HOME ] || unzip -qq apache-maven-${CUSTOM_MVN_VERION}-bin.zip;
[ -d $M2_HOME ] || mv apache-maven-${CUSTOM_MVN_VERION} $M2_HOME;
2018-03-23 00:54:00 -04:00
export PATH=$M2_HOME/bin:$PATH;
mvn -v;
2018-03-23 00:54:00 -04:00
fi
after_success:
2018-04-19 01:08:01 -04:00
- if [ "${JDK}" == 'OpenJDK 8' ] || [ "${JDK}" == 'OpenJDK 6' ]; then
mvn -v;
if [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" == 'master' ];then
mvn deploy -DskipTests=true -B || travis_terminate 1;
fi
2018-03-23 00:54:00 -04:00
fi
before_cache:
2018-09-25 23:35:44 -04:00
- rm -rf $HOME/.m2/repository/com/moparisthebest/jdbcmapper
2018-05-15 06:50:50 -04:00
cache:
timeout: 3000
2018-05-15 06:50:50 -04:00
directories:
- $HOME/.m2/repository
2018-05-17 01:47:42 -04:00
- $HOME/.traviscache