name: Tests

on: [ push, pull_request ]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: true
      matrix:
        php: [ 7.3, 7.4, 8.0, 8.1 ]
        dependency-version: [ prefer-lowest, prefer-stable ]

    name: P${{ matrix.php }} - ${{ matrix.dependency-version }}

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

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
          coverage: none

      - name: Install dependencies
        run: |
          composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader

      - name: Execute tests
        run: vendor/bin/phpunit

Update workflow add Github Actions workflow.
Update workflow add Github Actions workflow.
