name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  test:
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        ruby-version:
          - "3.1"
          - "3.4"
          - "4.0"

    steps:
      - uses: actions/checkout@v4

      - name: Install fish and zsh
        run: sudo apt-get install -y fish zsh

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

      - name: Run tests and linter
        run: bundle exec rake
