before_install:
  - gem update --system
  - gem update bundler

before_script:
  - "mysql -e 'create database by_star_test;'"
  - "psql -c 'create database by_star_test;' -U postgres"

env:
  - DB=sqlite
  - DB=mysql
  - DB=postgres
  - DB=mongodb

gemfile:
  - spec/gemfiles/Gemfile.rails40
  - spec/gemfiles/Gemfile.rails41
  - spec/gemfiles/Gemfile.rails42
  - spec/gemfiles/Gemfile.rails50
  - spec/gemfiles/Gemfile.rails51
  - spec/gemfiles/Gemfile.master

notifications:
  email:
    - radarlistener@gmail.com

branches:
  only:
    - master

rvm:
  - 2.0.0
  - 2.1.9
  - 2.2.5
  - 2.3.1
  - 2.4.2
  - 2.5.0

matrix:
  allow_failures:
    - gemfile: spec/gemfiles/Gemfile.master

services: mongodb

before_install:
  - gem update --system
  - gem update bundler

before_script:
  - "mysql -e 'create database by_star_test;'"
  - "psql -c 'create database by_star_test;' -U postgres"

env:
  - DB=sqlite
  - DB=mysql
  - DB=postgres
  - DB=mongodb

gemfile:
  - spec/gemfiles/Gemfile.rails40
  - spec/gemfiles/Gemfile.rails41
  - spec/gemfiles/Gemfile.rails42
  - spec/gemfiles/Gemfile.rails50
  - spec/gemfiles/Gemfile.rails51
  - spec/gemfiles/Gemfile.master

notifications:
  email:
    - radarlistener@gmail.com

branches:
  only:
    - master

rvm:
  - 2.0.0
  - 2.1.9
  - 2.2.5
  - 2.3.1
  - 2.4.2
  - 2.5.0

matrix:
  exclude:
  - rvm: 2.0.0
    gemfile: "spec/gemfiles/Gemfile.rails50"
  - rvm: 2.0.0
    gemfile: "spec/gemfiles/Gemfile.rails51"
  - rvm: 2.0.0
    gemfile: "spec/gemfiles/Gemfile.rails50"
  - rvm: 2.1.0
    gemfile: "spec/gemfiles/Gemfile.rails51"
  - rvm: 2.4.2
    gemfile: "spec/gemfiles/Gemfile.rails40"
  - rvm: 2.5.0
    gemfile: "spec/gemfiles/Gemfile.rails40"
  - rvm: 2.4.2
    gemfile: "spec/gemfiles/Gemfile.rails41"
  - rvm: 2.5.0
    gemfile: "spec/gemfiles/Gemfile.rails41"
  allow_failures:
    - gemfile: spec/gemfiles/Gemfile.master


services: mongodb

Exclude builds where Ruby / Rails versions are incompatible
Exclude builds where Ruby / Rails versions are incompatible
