language: ruby
rvm:
  - 2.3.8
  - 2.4.5
  - 2.5.3
  - 2.6.2
  - ruby-head
gemfile:
  - gemfiles/rails_5.0.gemfile
  - gemfiles/rails_5.1.gemfile
  - gemfiles/rails_5.2.gemfile
  - gemfiles/rails_6.0.gemfile
matrix:
  exclude:
    - rvm: 2.3.8
      gemfile: gemfiles/rails_6.0.gemfile
    - rvm: 2.4.5
      gemfile: gemfiles/rails_6.0.gemfile
script:
  - bundle exec rake rubocop
  - bundle exec rspec

language: ruby
rvm:
  - 2.3.8
  - 2.4.5
  - 2.5.3
  - 2.6.2
  - ruby-head
gemfile:
  - gemfiles/rails_5.0.gemfile
  - gemfiles/rails_5.1.gemfile
  - gemfiles/rails_5.2.gemfile
  - gemfiles/rails_6.0.gemfile
matrix:
  exclude:
    - rvm: 2.3.8
      gemfile: gemfiles/rails_6.0.gemfile
    - rvm: 2.4.5
      gemfile: gemfiles/rails_6.0.gemfile
    - rvm: ruby-head
      gemfile: gemfiles/rails_5.0.gemfile
    - rvm: ruby-head
      gemfile: gemfiles/rails_5.1.gemfile
    - rvm: ruby-head
      gemfile: gemfiles/rails_5.2.gemfile
script:
  - bundle exec rake rubocop
  - bundle exec rspec

Exclude testing old rails versions on latest ruby
Exclude testing old rails versions on latest ruby

See: https://github.com/rails/rails/issues/37464
