name: CI
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: [2.5, 2.6, 2.7]
        bundler: [default]
        gemfile:
          - rails-5.2
          - rails-6.0
          - rails-6.1
        include:
          - { ruby: "2.3", gemfile: "rails-4.2", bundler: "1" }
          - { ruby: "2.4", gemfile: "rails-4.2", bundler: "1" }

    env:
      BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
    steps:
      # https://github.com/marketplace/actions/checkout
      - uses: actions/checkout@v2
      # https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler: ${{ matrix.bundler }}
          bundler-cache: true # runs `bundle install` and caches gems automatically
      - name: Run tests
        run: bundle exec rake

name: CI
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: [2.5, 2.6, 2.7]
        bundler: [default]
        gemfile:
          - rails-5.2
          - rails-6.0
          - rails-6.1
        include:
          - { ruby: "2.3", gemfile: "rails-4.2", bundler: "1" }
          - { ruby: "2.4", gemfile: "rails-4.2", bundler: "1" }
          - { ruby: "3.0", gemfile: "rails-6.1", bundler: "default" }

    env:
      BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
    steps:
      # https://github.com/marketplace/actions/checkout
      - uses: actions/checkout@v2
      # https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler: ${{ matrix.bundler }}
          bundler-cache: true # runs `bundle install` and caches gems automatically
      - name: Run tests
        run: bundle exec rake

Add Ruby 3 to build matrix
Add Ruby 3 to build matrix
