name: unit-test

on: [push]

jobs:
  build-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - uses: php-actions/composer@v6

      - name: PHPUnit Tests
        uses: php-actions/phpunit@v4
        with:
          php_extensions: xdebug
          bootstrap: tests/bootstrap.php
          configuration: phpunit.xml
          args: --coverage-text
        env:
          XDEBUG_MODE: coverage
