language: ruby
rvm:
  - 1.9.3
  - 1.9.2
  - jruby-19mode

env:
  - "RAILS_ENV=test DB=mysql    DISPLAY=:99 BUNDLE_WITHOUT=postgres:sqlite"
  - "RAILS_ENV=test DB=postgres DISPLAY=:99 BUNDLE_WITHOUT=mysql:sqlite"

before_script:
  - sh -c "cp config/database.$DB.yml config/database.yml"
  - sh -c "cp config/environment.local.example config/environment.local.rb"
  - sh -c "if [ \"$DB\" = 'postgres' ]; then psql -c 'create database jobsworth_test;' -U postgres; fi"
  - sh -c "if [ \"$DB\" = 'mysql' ]; then mysql -e 'create database jobsworth_test;'; fi"
  - "sh -e /etc/init.d/xvfb start"

# Run specs & acceptance tests, and ensure that assets can compile without errors
script:
  - "bundle exec rake db:schema:load RAILS_ENV=test"
  - "bundle exec rake db:migrate RAILS_ENV=test"
  - "bundle exec rake"

# To stop Travis from running tests for a new commit,
# add the following to your commit message: [ci skip]
# You should add this when you edit documentation or comments, etc.

language: ruby
rvm:
  - 1.9.3
  - 1.9.2
  - jruby-19mode

env:
  - "RAILS_ENV=test DB=mysql    BUNDLE_WITHOUT=postgres:sqlite"
  - "RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=mysql:sqlite"

before_script:
  - sh -c "cp config/database.$DB.yml config/database.yml"
  - sh -c "cp config/environment.local.example config/environment.local.rb"
  # - "sh -e /etc/init.d/xvfb start; export DISPLAY=:99;" # for cucumber with js

# Run specs & acceptance tests, and ensure that assets can compile without errors
script:
  - "bundle exec rake db:create db:schema:load db:migrate RAILS_ENV=test"
  # - "RAILS_ENV=test bundle exec rake assets:precompile"
  - "bundle exec rake"

# To stop Travis from running tests for a new commit,
# add the following to your commit message: [ci skip]
# You should add this when you edit documentation or comments, etc.

Simplify and speed up build preparing scipts
Simplify and speed up build preparing scipts
