name: Test

on:
  - push
  - pull_request

jobs:
  test:
    name: "Ruby ${{ matrix.ruby }}"
    runs-on: ubuntu-latest

    strategy:
      matrix:
        ruby: ["3.0", "2.7", "2.6", "jruby-head"]

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby ${{ matrix.ruby }}
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically
      - name: Run tests
        run: bundle exec rake

name: Test

on:
  - push
  - pull_request

jobs:
  test:
    name: "Ruby ${{ matrix.ruby }}"
    runs-on: ubuntu-latest

    strategy:
      matrix:
        ruby:
          - 3.1
          - "3.0" # Needs quotes, otherwise stringified to "3"
          - 2.7
          - 2.6
          - jruby-head

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby ${{ matrix.ruby }}
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically
      - name: Run tests
        run: bundle exec rake

Add Ruby 3.1 to matrix
CI: Add Ruby 3.1 to matrix