Skip to content

Commit

Permalink
skip db:mysql and db:postgres db (re-)creation for faster test starts
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Aug 17, 2016
1 parent eff8386 commit 269d155
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ script: bundle exec rake test_$DB
before_script:
- export JRUBY_OPTS="--server $JRUBY_OPTS" # -Xcompile.invokedynamic=false
- mvn prepare-package # compiles ext generates: lib/arjdbc/jdbc/adapter_java.jar
- mysql --version # to see if we're using MySQL or MariaDB
- mysql --version || true # to see if we're using MySQL or MariaDB
- '[ "$DB" == "postgresql" ] && jruby -rbundler/setup -S rake db:postgresql || true'
- '[ "$DB" == "mysql" ] && jruby -rbundler/setup -S rake db:mysql || true'
- '[ "$DB" == "mariadb" ] && jruby -rbundler/setup -S rake db:mysql || true'
- '[ "$DB" == "jdbc" ] && jruby -rbundler/setup -S rake db:mysql || true'
- '[ "$DB" == "jndi" ] && jruby -rbundler/setup -S rake db:mysql || true'
before_install:
- ((jruby -v | grep 1.8.7) && jruby --1.9 -S gem update --system 2.1.11) || true
rvm:
Expand Down
4 changes: 2 additions & 2 deletions rakelib/02-test.rake
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ test_task_for :Derby, :desc => 'Run tests against (embedded) DerbyDB'
test_task_for :H2, :desc => 'Run tests against H2 database engine'
test_task_for :HSQLDB, :desc => 'Run tests against HyperSQL (Java) database'
test_task_for :MSSQL, :driver => :jtds, :database_name => 'MS-SQL (SQLServer)'
test_task_for :MySQL, :prereqs => 'db:mysql'
test_task_for :PostgreSQL, :driver => 'postgres', :prereqs => 'db:postgresql'
test_task_for :MySQL #, :prereqs => 'db:mysql'
test_task_for :PostgreSQL, :driver => 'postgres' #, :prereqs => 'db:postgresql'
task :test_postgres => :test_postgresql # alias
test_task_for :SQLite3, :driver => ENV['JDBC_SQLITE_VERSION']
task :test_sqlite => :test_sqlite3 # alias
Expand Down

0 comments on commit 269d155

Please sign in to comment.