name: PHPUnit

on:
  push:
  pull_request:

jobs:
  tests:
    name: Tests
    strategy:
      matrix:
        include:
          - php: '7.0'
            mode: low-deps
          - php: '7.1'
          - php: '7.2'
          - php: '8.1'
          - php: '8.0'
          - php: '8.1'
            mode: low-deps
      fail-fast: false

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          coverage: xdebug
          php-version: "${{ matrix.php }}"
      - 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@v1
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
          restore-keys: ${{ runner.os }}-composer-
      - name: Install
        run: |
          composer install -n
          if [ "${{ matrix.mode }}" = "low-deps" ]; then composer update --prefer-lowest --prefer-stable -n; fi;
      - name: Tests
        run: vendor/bin/phpunit
name: PHPUnit

on:
  push:
  pull_request:

jobs:
  tests:
    name: Tests
    strategy:
      matrix:
        include:
          - php: '7.4'
          - php: '8.1'
          - php: '8.0'
          - php: '8.1'
            mode: low-deps
      fail-fast: false

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          coverage: xdebug
          php-version: "${{ matrix.php }}"
      - 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@v1
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
          restore-keys: ${{ runner.os }}-composer-
      - name: Install
        run: |
          composer install -n
          if [ "${{ matrix.mode }}" = "low-deps" ]; then composer update --prefer-lowest --prefer-stable -n; fi;
      - name: Tests
        run: vendor/bin/phpunit
Remove older versions of PHP in CI
Remove older versions of PHP in CI
