name: Test

on: [push, pull_request]

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        ruby-version: ['3.0', 2.7, 2.6, 2.5]

    # From https://docs.github.com/en/actions/guides/creating-redis-service-containers
    services:
      redis:
        image: redis
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 6379:6379

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

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

    - name: Run tests & lint
      run: bundle exec rake

name: Test

on: [push, pull_request]

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        ruby-version: [3.1, '3.0', 2.7, 2.6, 2.5]

    # From https://docs.github.com/en/actions/guides/creating-redis-service-containers
    services:
      redis:
        image: redis
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 6379:6379

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

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

    - name: Run tests & lint
      run: bundle exec rake

Add Ruby 3.1 to test matrix
Add Ruby 3.1 to test matrix
