name: Continuous Integration

on: ['push', 'pull_request']

jobs:
  ci:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        php: [7.2, 7.3, 7.4]
        dependency-version: [prefer-lowest, prefer-stable]
        continue-on-error: [false]
        include:
          - php: 8.0
            continue-on-error: true

    continue-on-error: ${{ matrix.continue-on-error }}

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

    steps:

    - name: Checkout
      uses: actions/checkout@v2

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

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php }}
        extensions: mbstring, zip
        tools: prestissimo
        coverage: pcov

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

    - name: PHPStan Analysis
      run: vendor/bin/phpstan analyse

    - name: PHPUnit Testing
      run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml


name: Continuous Integration

on: ['push', 'pull_request']

jobs:
  ci:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        php: [7.2, 7.3, 7.4]
        dependency-version: [prefer-lowest, prefer-stable]
        continue-on-error: [false]
        include:
          - php: 8.0
            dependency-version: prefer-lowest
            continue-on-error: true
          - php: 8.0
            dependency-version: prefer-stable
            continue-on-error: true

    continue-on-error: ${{ matrix.continue-on-error }}

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

    steps:

    - name: Checkout
      uses: actions/checkout@v2

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

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php }}
        extensions: mbstring, zip
        tools: prestissimo
        coverage: pcov

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

    - name: PHPStan Analysis
      run: vendor/bin/phpstan analyse

    - name: PHPUnit Testing
      run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml


Add dependency-version config for PHP 8 tests
Add dependency-version config for PHP 8 tests