sudo: false
language: java
jdk:
  - oraclejdk8
  - oraclejdk7
  - openjdk7
services:
  - mysql
  - pgsql
matrix:
  include:
  - jdk: oraclejdk8
    env: DB=mysql
  - jdk: oraclejdk8
    env: DB=pgsql

script: mvn test -Dspring.profiles.active=$DB

before_script:
  - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE test;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS test;' -uroot; fi"

sudo: false
language: java
jdk:
  - oraclejdk8
  - openjdk7
services:
  - mysql
  - pgsql
matrix:
  include:
  - jdk: oraclejdk8
    env: DB=mysql
  - jdk: oraclejdk8
    env: DB=pgsql

script: mvn test -Dspring.profiles.active=$DB

before_script:
  - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE test;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS test;' -uroot; fi"

Remove oraclejdk7 from the test matrix
[test] Remove oraclejdk7 from the test matrix

Related: https://github.com/travis-ci/travis-ci/issues/7019
