name: PHPUnit

on:
  pull_request:
  push:

permissions:
  contents: read

jobs:
  build:
    name: PHPUnit
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
    steps:
      - uses: actions/checkout@v4
      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
      - name: Composer install
        run: composer install
      - name: PHPUnit / PHP ${{ matrix.php-version }}
        run: ./vendor/bin/phpunit
