name: rspec
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - "*"
jobs:
  rspec:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-20.04, ubuntu-18.04]
        ruby: [2.5, 2.6, 2.7, 3.0]
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: install dependency
        run: bundle install
      - name: run spec
        run: bundle exec rake spec

name: rspec
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - "*"
jobs:
  rspec:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-20.04, ubuntu-18.04]
        ruby: [2.5, 2.6, 2.7, '3.0', 3.1]
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: install dependency
        run: bundle install
      - name: run spec
        run: bundle exec rake spec

Add Ruby 3.1 to the CI matrix
Add Ruby 3.1 to the CI matrix

Also quoted 3.0 to prevent truncation to 3.  This ensures that a 3.0.x Ruby version is run in CI.
