name: Run tests
on:
  - push
jobs:
  run-tests:
    strategy:
      fail-fast: false
      matrix:
        version:
          - 3.2.2
          - 3.1.4
          - 3.0.6
          - 2.7.8
    runs-on: ubuntu-latest
    env:
      CI: true
      BUNDLE_GEMFILE: ${{ github.workspace }}/graphql-latest.gemfile
    steps:
      - name: Checkout a commit
        uses: actions/checkout@v4
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.version }}
          bundler-cache: true
      - name: Run tests
        run: bundle exec rspec
