name: CI

on:
  - pull_request
  - push

jobs:
  run:
    strategy:
      fail-fast: false
      matrix:
        php-versions: ['7.3', '7.4', '8.0']
    runs-on: ubuntu-latest
    name: PHP ${{ matrix.php-versions }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          coverage: pcov
        env:
          update: true

      - name: Get composer cache directory
        id: composer-cache
        run: echo "::set-output name=dir::$(composer config cache-files-dir)"

      - name: Cache composer dependencies
        uses: actions/cache@v2
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
          restore-keys: ${{ runner.os }}-composer-

      - name: Install dependencies
        run: composer update --no-ansi --no-interaction --no-progress --prefer-dist

      - name: Run tests
        run: vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml

      - name: Upload coverage results to Coveralls
        env:
          COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          composer require --no-ansi --no-interaction --no-progress --prefer-dist php-coveralls/php-coveralls
          php vendor/bin/php-coveralls -v

name: CI

on:
  - pull_request
  - push

jobs:
  run:
    strategy:
      fail-fast: false
      matrix:
        php-versions: ['7.3', '7.4', '8.0', '8.1']
    runs-on: ubuntu-latest
    name: PHP ${{ matrix.php-versions }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          coverage: pcov
        env:
          update: true

      - name: Get composer cache directory
        id: composer-cache
        run: echo "::set-output name=dir::$(composer config cache-files-dir)"

      - name: Cache composer dependencies
        uses: actions/cache@v2
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
          restore-keys: ${{ runner.os }}-composer-

      - name: Install dependencies
        run: composer update --no-ansi --no-interaction --no-progress --prefer-dist

      - name: Run tests
        run: vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml

      - name: Upload coverage results to Coveralls
        env:
          COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          composer require --no-ansi --no-interaction --no-progress --prefer-dist php-coveralls/php-coveralls
          php vendor/bin/php-coveralls -v

Add PHP 8.1 to the test matrix
Add PHP 8.1 to the test matrix
