machine:
  ruby:
    version: 2.3.4
  node:
    version: 6

dependencies:
  cache_directories:
    - "~/.cache/yarn"
  pre:
    - curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    - sudo dpkg -i google-chrome.deb
    - sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
    - rm google-chrome.deb
  override:
    - gem install bundler --pre
    - bundle check --path=vendor/bundle || bundle install --path=vendor/bundle
      --jobs=4 --retry=3
    - yarn

test:
  pre:
    - RAILS_ENV=test bundle exec rake db:create db:schema:load
  override:
    - bundle exec rspec --format progress --format RspecJunitFormatter -o
      $CIRCLE_TEST_REPORTS/rspec.xml
    - RAILS_ENV=test bundle exec rake jasmine:ci

deployment:
  staging:
    branch: master
    heroku:
      appname: ifme

machine:
  ruby:
    version: 2.3.4
  node:
    version: 6

dependencies:
  cache_directories:
    - "~/.cache/yarn"
  pre:
    - curl -L -o google-chrome.deb
      https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    - sudo dpkg -i google-chrome.deb
    - sudo sed -i 's|HERE/chrome\"|HERE/chrome\"
      --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
    - rm google-chrome.deb
  override:
    - gem install bundler
    - bundle install --path=vendor/bundle --jobs=4 --retry=3
    - yarn

test:
  pre:
    - RAILS_ENV=test bundle exec rake db:create db:schema:load
    - cd client &&
      RAILS_ENV=test bundle exec rake react_on_rails:locale &&
      yarn run build:test
  override:
    - bundle exec rspec --format progress --format RspecJunitFormatter -o
      $CIRCLE_TEST_REPORTS/rspec.xml
    - RAILS_ENV=test bundle exec rake jasmine:ci

deployment:
  staging:
    branch: master
    heroku:
      appname: ifme

Build React files on CircleCI
Build React files on CircleCI
