name: test

on:
  push:
  pull_request:

jobs:
  test:
    runs-on: ubuntu-20.04

    strategy:
      fail-fast: false

      matrix:
        gemfile:
          - gemfiles/rails_5.2/Gemfile
          - gemfiles/rails_6.0/Gemfile
          - gemfiles/rails_6.1/Gemfile
          - gemfiles/rails_edge/Gemfile

        ruby:
          - 2.4.10
          - 2.5.8
          - 2.6.6
          - 2.7.2

        exclude:
          - ruby: 2.4.10
            gemfile: gemfiles/rails_6.0/Gemfile

          - ruby: 2.4.10
            gemfile: gemfiles/rails_6.1/Gemfile

          - ruby: 2.4.10
            gemfile: gemfiles/rails_edge/Gemfile

    env:
      BUNDLE_GEMFILE: ${{ matrix.gemfile }}

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v2
        with:
          node-version: 11

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true

      - name: Run tests
        run: |
          bundle exec rake spec
          script/integration.sh
        continue-on-error: ${{ matrix.gemfile == 'gemfiles/rails_edge/Gemfile' }}

name: test

on:
  push:
  pull_request:

jobs:
  test:
    runs-on: ubuntu-20.04

    strategy:
      fail-fast: false

      matrix:
        gemfile:
          - gemfiles/rails_5.2/Gemfile
          - gemfiles/rails_6.0/Gemfile
          - gemfiles/rails_6.1/Gemfile
          - gemfiles/rails_edge/Gemfile

        ruby:
          - 2.4.10
          - 2.5.8
          - 2.6.6
          - 2.7.2
          - 3.0.0

        exclude:
          - ruby: 2.4.10
            gemfile: gemfiles/rails_6.0/Gemfile

          - ruby: 2.4.10
            gemfile: gemfiles/rails_6.1/Gemfile

          - ruby: 2.4.10
            gemfile: gemfiles/rails_edge/Gemfile

          - ruby: 3.0.0
            gemfile: gemfiles/rails_5.2/Gemfile

    env:
      BUNDLE_GEMFILE: ${{ matrix.gemfile }}

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v2
        with:
          node-version: 11

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true

      - name: Run tests
        run: |
          bundle exec rake spec
          script/integration.sh
        continue-on-error: ${{ matrix.gemfile == 'gemfiles/rails_edge/Gemfile' }}

Test ruby 3.0 in CI
Test ruby 3.0 in CI
