language: ruby sudo: false branches: only: - master - /.*-stable$/ - /^test-.*/ - /maintenance|support/ - /.*dev$/ bundler_args: --without development script: bundle exec rake ${TEST_PREFIX}test_$DB before_install: - unset _JAVA_OPTIONS 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 rvm: - jruby-9.2.7.0 jdk: - openjdk8 env: global: - AR_VERSION="master" 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: "9.4" env: DB=postgresql PREPARED_STATEMENTS=false INSERT_RETURNING=false - addons: postgresql: "9.4" env: DB=postgresql PREPARED_STATEMENTS=false INSERT_RETURNING=true - addons: postgresql: "9.4" env: DB=postgresql PREPARED_STATEMENTS=true - addons: postgresql: "9.4" env: DB=postgresql PREPARED_STATEMENTS=true INSERT_RETURNING=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: "9.4" - env: DB=sqlite3 jdk: oraclejdk11 # jruby-head - rvm: jruby-head env: DB=mysql2 - rvm: jruby-head env: DB=postgresql addons: postgresql: "9.4" - rvm: jruby-head env: DB=sqlite3 # testing against MariaDB - addons: mariadb: '10.0' env: DB=mariadb PREPARED_STATEMENTS=false - addons: mariadb: '10.1' env: DB=mariadb PREPARED_STATEMENTS=true # Rails test-suite : - env: DB=mysql2 TEST_PREFIX="rails:" AR_VERSION="master" # PS off by default - env: DB=mysql2 TEST_PREFIX="rails:" AR_VERSION="master" PREPARED_STATEMENTS=true - env: DB=mysql2 TEST_PREFIX="rails:" AR_VERSION="master" DRIVER=MariaDB - addons: postgresql: "9.4" env: DB=postgresql TEST_PREFIX="rails:" AR_VERSION="master" # PS on by default - addons: postgresql: "9.4" env: DB=postgresql TEST_PREFIX="rails:" AR_VERSION="master" PREPARED_STATEMENTS=false - env: DB=sqlite3 TEST_PREFIX="rails:" AR_VERSION="master"