language: ruby
cache: bundler
rvm:
  - 2.4.0

sudo: false

notifications: # set notification options
  email: false

services:
  - postgresql

before_install:
  - gem update --system # update ruby gems
  - if [[ `npm -v` != 4* ]]; then npm i -g npm@4; fi # get the latest version of npm
  - nvm install 7.2.1 # node 7.2.1

install:
  - bundle install
  - (cd client && npm install)

before_script:
  - psql -c 'create database challenges_test' -U postgres
  - RAILS_ENV=test rake db:migrate

script:
  - bin/test

language: ruby
cache: bundler
rvm:
  - 2.4.0

sudo: false

notifications: # set notification options
  email: false

services:
  - postgresql

before_install:
  - gem update --system # update ruby gems
  - if [[ `npm -v` != 4* ]]; then npm i -g npm@4; fi # get the latest version of npm
  - nvm install 7.2.1 # node 7.2.1

install:
  - bundle install
  - (cd client && npm install)

before_script:
  - psql -c 'create database challenges_test' -U postgres
  - bundle exec rake db:reset

script:
  - bin/test

env:
  global:
    RAILS_ENV=test

Set RAILS_ENV globally and use db:reset
Set RAILS_ENV globally and use db:reset
