name: PHPUnit

on: [push, pull_request]

jobs:
  build:
    name: Run tests on ${{ matrix.php }}
    runs-on: ubuntu-latest

    strategy:
      matrix:
        php: [ '7.4', '8.0', '8.1', '8.2' ]

    steps:
      - name: Checkout
        uses: actions/checkout@v3

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

      - name: Composer Install
        run: composer install

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