shakacode/react-webpack-rails-tutorial

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: ruby

rvm:
  - 2.7.1

services:
  - docker
  - postgresql

notifications:
  slack: shakacode:YvfXbuFMcFAHt6ZjABIs0KET

cache:
  bundler: true
  directories:
    - node_modules # NPM packages
  yarn: true

gemfile: Gemfile

env:
  global:
    - RAILS_ENV=test
    - NODE_ENV=test
    - DRIVER=selenium_chrome
    - CHROME_BIN=/usr/bin/google-chrome
    - USE_COVERALLS=TRUE

before_install:
  - sudo apt-get update
  - sudo apt-get install -y xvfb libappindicator1 fonts-liberation
  - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  - sudo dpkg -i google-chrome*.deb
  - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen scn 1600x1200x16"

install:
  - travis_retry gem install bundler -v '<2' # Ruby 2.2 and Rails 3.2 & 4.2 depend on bundler 1.x.
  - travis_retry nvm install 12
  - node -v
  - travis_retry npm i -g yarn
  - travis_retry bundle install
  - travis_retry yarn
  - bundle
  - yarn
  - google-chrome --version
  - rake db:setup
  - bundle exec rake react_on_rails:locale

before_script:
  - "export DISPLAY=:99"

script:
  - bundle exec rake db:schema:load
  - bundle exec rake