1name: Unit Tests 2 3on: [push, pull_request] 4 5jobs: 6 run: 7 name: PHP ${{ matrix.php-versions }} 8 runs-on: ubuntu-latest 9 if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 10 11 strategy: 12 matrix: 13 php-versions: [7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] 14 fail-fast: false 15 16 steps: 17 - name: Checkout 18 uses: actions/checkout@v4 19 20 - name: Setup PHP 21 uses: shivammathur/setup-php@v2 22 with: 23 php-version: ${{ matrix.php-versions }} 24 25 - name: Setup problem matchers 26 run: | 27 echo ::add-matcher::${{ runner.tool_cache }}/php.json 28 echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json 29 30 - name: Setup Dependencies 31 run: | 32 composer update 33 composer install 34 - name: Run PHPUnit 35 run: | 36 ./vendor/bin/phpunit --verbose 37