language: ruby
# Workaround for https://github.com/travis-ci/travis-ci/issues/8836
# sudo: false
sudo: required
dist: trusty

addons:
  chrome: stable
cache:
  bundler: true

before_install:
  - gem update --system
  - gem install bundler
  - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &

rvm:
  - 2.4.2

env:
  global:
    - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
    - ENGINE_CART_RAILS_OPTIONS='--skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-puma --skip-test'
  # Travis should check every minor version in a range of supported versions, because
  # rails does not follow sem-ver conventions, see http://guides.rubyonrails.org/maintenance_policy.html
  # It should be sufficient to test only the latest of the patch versions for a minor version, they
  # should be compatible across patch versions (only bug fixes are released in patch versions).
  matrix:
    - "RAILS_VERSION=5.1.4"
    - "RAILS_VERSION=5.0.6"

services:
  - redis-server
before_script:
  - jdk_switcher use oraclejdk8

language: ruby
# Workaround for https://github.com/travis-ci/travis-ci/issues/8836
# sudo: false
sudo: required
dist: trusty

addons:
  chrome: stable
cache:
  bundler: true

before_install:
  - gem update --system
  - gem install bundler
  - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &

rvm:
  - 2.5.0

env:
  global:
    - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
    - ENGINE_CART_RAILS_OPTIONS='--skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-puma --skip-test'
  # Travis should check every minor version in a range of supported versions, because
  # rails does not follow sem-ver conventions, see http://guides.rubyonrails.org/maintenance_policy.html
  # It should be sufficient to test only the latest of the patch versions for a minor version, they
  # should be compatible across patch versions (only bug fixes are released in patch versions).
  matrix:
    - "RAILS_VERSION=5.1.4"
    - "RAILS_VERSION=5.0.6"

services:
  - redis-server
before_script:
  - jdk_switcher use oraclejdk8

Update test matrix to use latest ruby -- 2.5.0
Update test matrix to use latest ruby -- 2.5.0
