name: Continuous integration

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
        fail-fast: true
        matrix:
            php: [7.3, 7.4, 8.0]
            stability: [prefer-lowest, prefer-stable]

    name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

    steps:
    - name: Checkout code
      uses: actions/checkout@v2
      with:
        fetch-depth: 0

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
          php-version: ${{ matrix.php }}
          tools: composer:v2
          coverage: xdebug

    - name: Install dependencies
      uses: nick-invision/retry@v1
      with:
          timeout_minutes: 5
          max_attempts: 5
          command: |
            composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
            # revert updated composer.lock
            git checkout composer.lock

    - name: Run tests
      run: php vendor/bin/phpunit

    - name: Submit code coverage
      uses: codecov/codecov-action@v1

    - name: Evaluate semantic versioning
      run: php bin/php-semver-checker-git suggest --allow-detached -vvv --details --include-before=src --include-after=src

name: Continuous integration

on: [push]

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

    name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

    steps:
    - name: Checkout code
      uses: actions/checkout@v2
      with:
        fetch-depth: 0

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
          php-version: ${{ matrix.php }}
          tools: composer:v2
          coverage: xdebug

    - name: Install dependencies
      uses: nick-invision/retry@v1
      with:
          timeout_minutes: 5
          max_attempts: 5
          command: |
            composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
            # revert updated composer.lock
            git checkout composer.lock

    - name: Run tests
      run: php vendor/bin/phpunit

    - name: Submit code coverage
      uses: codecov/codecov-action@v1

    - name: Evaluate semantic versioning
      run: php bin/php-semver-checker-git suggest --allow-detached -vvv --details --include-before=src --include-after=src

Add support for PHP 8.1
Add support for PHP 8.1
