name: Tests

on:
  push:
    branches:
      - "**"
  pull_request:
    types: [ready_for_review, synchronize, opened]

jobs:
  php-tests:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        php: [7.2, 7.3, 7.4]
        dependency-version: [prefer-lowest, prefer-stable]
        os: [ubuntu-latest]

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

    steps:
      - name: Checkout the code
        uses: actions/checkout@v1

      -   name: Cache dependencies
          uses: actions/cache@v1
          with:
              path: ~/.composer/cache/files
              key: dependencies-php-${{ matrix.php }}-${{ matrix.dependency-version }}-composer-${{ hashFiles('composer.json') }}

      - name: Setup PHP
        uses: shivammathur/setup-php@v1
        with:
          php-version: ${{ matrix.php }}
          extension: mbstring, pdo, pdo_sqlite
          coverage: none

      - name: Install dependencies
        run: |
          composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

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

name: Tests

on:
  push:
    branches:
      - "**"
  pull_request:
    types: [ready_for_review, synchronize, opened]

jobs:
  php-tests:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        php: [7.2, 7.3, 7.4]
        dependency-version: [prefer-lowest, prefer-stable]
        os: [ubuntu-latest]

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

    steps:
      - name: Checkout the code
        uses: actions/checkout@v1

      -   name: Cache dependencies
          uses: actions/cache@v1
          with:
              path: ~/.composer/cache/files
              key: dependencies-php-${{ matrix.php }}-${{ matrix.dependency-version }}-composer-${{ hashFiles('composer.json') }}

      - name: Setup PHP
        uses: shivammathur/setup-php@v1
        with:
          php-version: ${{ matrix.php }}
          extension: mbstring, intl
          coverage: xdebug

      - name: Install dependencies
        run: |
          composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

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

Fix code coverage error from PHPUnit
Fix code coverage error from PHPUnit