name: The PHP League Tests

on: [push, pull_request]

jobs:
  ci:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: true
      matrix:
        os: [ubuntu-20.04]
        php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]

    name: League - PHP ${{ matrix.php }} on ${{ matrix.os }}

    steps:

      - name: Checkout code
        uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          tools: phpcs, phpunit

      - name: Download dependencies
        uses: ramsey/composer-install@v2

      - name: Run Tests
        run: vendor/bin/phpunit
