name: Continuous Integration

on: [push, pull_request]

jobs:
  quality:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      matrix:
        operating-system: [ubuntu-latest]
        # TODO Add 8.1 version as well
        php-versions: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
    name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      
      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
            php-version: ${{ matrix.php-versions }}

      - name: Install dependencies
        run: composer install --no-interaction --no-progress --prefer-dist
      
      - name: PHP Unit tests
        if: ${{ matrix.php-versions != '7.3' }}
        run: vendor/bin/phpunit

      - name: PHP Unit tests generating coverage data
        if: ${{ matrix.php-versions == '7.3' }}
        run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
      
      - name: Upload code coverage data
        if: ${{ matrix.php-versions == '7.3' }}
        run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
name: Continuous Integration

on: [push, pull_request]

jobs:
  quality:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      matrix:
        operating-system: [ubuntu-latest]
        php-versions: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
    name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      
      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
            php-version: ${{ matrix.php-versions }}

      - name: Install dependencies
        run: composer install --no-interaction --no-progress --prefer-dist
      
      - name: PHP Unit tests
        if: ${{ matrix.php-versions != '7.3' }}
        run: vendor/bin/phpunit

      - name: PHP Unit tests generating coverage data
        if: ${{ matrix.php-versions == '7.3' }}
        run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
      
      - name: Upload code coverage data
        if: ${{ matrix.php-versions == '7.3' }}
        run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
Add PHP 8.1 to the build matrix
Add PHP 8.1 to the build matrix
