name: Test

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: [2.6, 2.7, 3.0, 3.1]
        gemfile: [rails_5.0, rails_5.1, rails_5.2, rails_6.0, rails_6.1, rails_7.0]
        exclude:
          - ruby: 2.6
            gemfile: rails_7.0
          - ruby: 3.0
            gemfile: rails_5.0
          - ruby: 3.0
            gemfile: rails_5.1
          - ruby: 3.0
            gemfile: rails_5.2
          - ruby: 3.1
            gemfile: rails_5.0
          - ruby: 3.1
            gemfile: rails_5.1
          - ruby: 3.1
            gemfile: rails_5.2
    env:
      BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run tests
        run: bundle exec rake

name: Test

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: ['2.6', '2.7', '3.0', '3.1']
        gemfile: [rails_5.0, rails_5.1, rails_5.2, rails_6.0, rails_6.1, rails_7.0]
        exclude:
          - ruby: '2.6'
            gemfile: rails_7.0
          - ruby: '3.0'
            gemfile: rails_5.0
          - ruby: '3.0'
            gemfile: rails_5.1
          - ruby: '3.0'
            gemfile: rails_5.2
          - ruby: '3.1'
            gemfile: rails_5.0
          - ruby: '3.1'
            gemfile: rails_5.1
          - ruby: '3.1'
            gemfile: rails_5.2
          - ruby: '3.1'
            gemfile: rails_7.0
    env:
      BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run tests
        run: bundle exec rake

Exclude ruby 3.1.0 and Rails 7.0.0.
ci: Exclude ruby 3.1.0 and Rails 7.0.0.

see https://bugs.ruby-lang.org/issues/14394#note-34
