name: Test

on:
  push:
    branches:
      - master

  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    name: Ruby ${{ matrix.ruby }}
    strategy:
      matrix:
        ruby:
          - "3.2"
          - "3.3"
          - "3.4"
          - "4.0"

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