name: Test Ruby

on:
  push:
  pull_request:

permissions:
  contents: read

jobs:
  test:
    strategy:
      matrix:
        os: ['ubuntu-18.04', 'ubuntu-20.04']
        ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1']
        # ubuntu 22.04 only supports ssl 3 and thus only ruby 3.1
        include:
        - os: 'ubuntu-22.04'
          ruby-version: '3.1'
    runs-on: ${{ matrix.os }}

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

Add Github Action to test against ruby 3.1
Add Github Action to test against ruby 3.1