sudo: false dist: xenial services: - mysql before_install: - unset _JAVA_OPTIONS - rvm @default,@global do gem uninstall bundler -a -x -I || true - gem install bundler -v "~>1.17.3" install: - bundle install --retry 3 --without development # to fix this issue: https://travis-ci.community/t/mariadb-10-1-fails-to-install-on-xenial/3151/3 - mysql -u root -e 'CREATE USER IF NOT EXISTS travis@localhost; GRANT ALL ON *.* TO travis@localhost;' || true language: ruby rvm: - jruby-9.2.7.0 jdk: - openjdk8 script: bundle exec rake ${TEST_PREFIX}test_$DB before_script: - echo "JAVA_OPTS=$JAVA_OPTS" - export JRUBY_OPTS="-J-Xms64M -J-Xmx1024M" - rake jar # compiles ext generates: lib/arjdbc/jdbc/adapter_java.jar - mysql --version || true # to see if we're using MySQL or MariaDB - '[ "$DB" == "postgresql" ] && [ "$TEST_PREFIX" == "" ] && rake db:postgresql || true' - '[ "$DB" == "mysql2" ] && [ "$TEST_PREFIX" == "" ] && rake db:mysql || true' - '[ "$DB" == "mariadb" ] && [ "$TEST_PREFIX" == "" ] && rake db:mysql || true' - '[ "$DB" == "jdbc" ] && rake db:mysql || true' - '[ "$DB" == "jndi" ] && rake db:mysql || true' # rails:test setups : - | [ "$DB" == "mysql2" ] && [ "$TEST_PREFIX" == "rails:" ] && \ mysql -e "CREATE USER rails@localhost;" && \ mysql -e "grant all privileges on activerecord_unittest.* to rails@localhost;" && \ mysql -e "grant all privileges on activerecord_unittest2.* to rails@localhost;" && \ mysql -e "grant all privileges on inexistent_activerecord_unittest.* to rails@localhost;" && \ mysql -e "CREATE DATABASE activerecord_unittest DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;" && \ mysql -e "CREATE DATABASE activerecord_unittest2 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;" \ || true - | [ "$DB" == "postgresql" ] && [ "$TEST_PREFIX" == "rails:" ] && \ psql -c "create database activerecord_unittest;" -U postgres && \ psql -c "create database activerecord_unittest2;" -U postgres \ || true env: global: - AR_VERSION="6-0-stable" matrix: allow_failures: - rvm: jruby-head include: - env: DB=mysql2 PREPARED_STATEMENTS=false - env: DB=mysql2 PREPARED_STATEMENTS=true - env: DB=mysql2 DRIVER=MariaDB - addons: postgresql: "10" env: DB=postgresql PREPARED_STATEMENTS=false INSERT_RETURNING=false - addons: postgresql: "10" env: DB=postgresql PREPARED_STATEMENTS=false INSERT_RETURNING=true - addons: postgresql: "10" env: DB=postgresql PREPARED_STATEMENTS=true - addons: postgresql: "10" env: DB=postgresql PREPARED_STATEMENTS=true INSERT_RETURNING=true - addons: postgresql: "9.4" env: DB=postgresql PREPARED_STATEMENTS=true - env: DB=sqlite3 PREPARED_STATEMENTS=false - env: DB=sqlite3 PREPARED_STATEMENTS=true - env: DB=jndi PREPARED_STATEMENTS=false - env: DB=jndi PREPARED_STATEMENTS=true # Java 11 - env: DB=mysql2 jdk: oraclejdk11 - env: DB=postgresql jdk: oraclejdk11 addons: postgresql: "10" - env: DB=sqlite3 jdk: oraclejdk11 # jruby-head - rvm: jruby-head env: DB=mysql2 - rvm: jruby-head env: DB=postgresql addons: postgresql: "10" - rvm: jruby-head env: DB=sqlite3 # testing against MariaDB - addons: mariadb: 10.2 env: DB=mariadb PREPARED_STATEMENTS=false - addons: mariadb: 10.3 env: DB=mariadb PREPARED_STATEMENTS=true # Rails test-suite : - env: DB=mysql2 TEST_PREFIX="rails:" AR_VERSION="6-0-stable" # PS off by default - env: DB=mysql2 TEST_PREFIX="rails:" AR_VERSION="6-0-stable" PREPARED_STATEMENTS=true - env: DB=mysql2 TEST_PREFIX="rails:" AR_VERSION="6-0-stable" DRIVER=MariaDB - addons: postgresql: "10" env: DB=postgresql TEST_PREFIX="rails:" AR_VERSION="6-0-stable" # PS on by default - addons: postgresql: "10" env: DB=postgresql TEST_PREFIX="rails:" AR_VERSION="6-0-stable" PREPARED_STATEMENTS=false - addons: postgresql: "9.4" env: DB=postgresql TEST_PREFIX="rails:" AR_VERSION="6-0-stable" # PS on by default - env: DB=sqlite3 TEST_PREFIX="rails:" AR_VERSION="6-0-stable"