language: ruby
dist: trusty
group: beta
cache: bundler

services:
  - redis-server

branches:
  only: [master]

rvm:
  - 2.3
  - 2.4
  - 2.5
  - 2.6
  - 2.7

env:
  - RAILS_VERSION=4
  - RAILS_VERSION=5
  - RAILS_VERSION=0

addons:
  apt:
    packages:
      - haveged

before_install:
  - service haveged start
  # Pin bundler version due to https://github.com/rubygems/rubygems/issues/2055
  - gem install bundler -v 1.16.0

matrix:
  include:
    - rvm: jruby-9.2.11.1
      env: JRUBY_OPTS="--dev -J-Djruby.launch.inproc=true -J-Xmx1024M" RAILS_VERSION=4
    - rvm: jruby-9.2.11.1
      env: JRUBY_OPTS="--dev -J-Djruby.launch.inproc=true -J-Xmx1024M" RAILS_VERSION=5
    - rvm: 2.7
      env: RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
    - rvm: ruby-head
      env: RAILS_VERSION=0

  allow_failures:
    - rvm: ruby-head

language: ruby
dist: trusty
group: beta
cache: bundler

services:
  - redis-server

branches:
  only: [master]

rvm:
  - 2.3
  - 2.4
  - 2.5
  - 2.6
  - 2.7

env:
  - RAILS_VERSION=4
  - RAILS_VERSION=5
  - RAILS_VERSION=0

addons:
  apt:
    packages:
      - haveged

before_install:
  - service haveged start
  # Pin bundler version due to https://github.com/rubygems/rubygems/issues/2055
  - gem install bundler -v 1.16.0

matrix:
  include:
    - rvm: jruby-9.2.11.1
      env: JRUBY_OPTS="--dev -J-Djruby.launch.inproc=true -J-Xmx1024M" RAILS_VERSION=4
    - rvm: jruby-9.2.11.1
      env: JRUBY_OPTS="--dev -J-Djruby.launch.inproc=true -J-Xmx1024M" RAILS_VERSION=5
    - rvm: 2.7
      env: RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
    - rvm: ruby-head
      env: RAILS_VERSION=0
  exclude:
    - rvm: 2.7
      env: RAILS_VERSION=4

  allow_failures:
    - rvm: ruby-head

Exclude the combination of Rails 4 and Ruby 2.7
Exclude the combination of Rails 4 and Ruby 2.7
