name: CI
on: [push, pull_request]
jobs:
  tests:
    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.experimental }}
    name: ${{ matrix.ruby }}
    strategy:
      matrix:
        experimental: [false]
        ruby:
          - "2.5"
          - "2.6"
          - "2.7"
          - "3.0"
          - "3.1"
          - "3.2"
          - "3.3"
        include:
          - { ruby: jruby, experimental: true }
          - { ruby: jruby-head, experimental: true }
          - { ruby: truffleruby, experimental: true }
          - { ruby: truffleruby-head, experimental: true }
          - { ruby: head, experimental: true }

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

      - name: Run tests
        timeout-minutes: 10
        run: bundle exec rake
