name: PHPUnit

on: [push, pull_request]

jobs:
  tests:
    name: Unit tests

    strategy:
      matrix:
        include:
          - php: '8.1'
            os: ubuntu-20.04
          - php: '8.0'
            os: macos-11
          - php: '8.0'
            mode: high-deps
            os: ubuntu-20.04
          - php: '8.1'
            mode: low-deps
            os: ubuntu-20.04
          - php: '8.2'
            mode: experimental
            os: ubuntu-20.04
      fail-fast: false

    runs-on: "${{ matrix.os }}"

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

      - name: Configure for PHP >= 8.2
        if: "matrix.php >= '8.2'"
        run: |
          composer config platform.php 8.1.99

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          coverage: "none"
          ini-values: date.timezone=Europe/Paris,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1
          php-version: "${{ matrix.php }}"
          extensions: "${{ env.extensions }}"
          tools: flex

      - name: Run tests
        run: |
          vendor/bin/phpunit --verbose --coverage-clover=coverage.clover
name: PHPUnit

on: [push, pull_request]

jobs:
  tests:
    name: Unit tests

    strategy:
      matrix:
        include:
          - php: '8.1'
            os: ubuntu-20.04
          - php: '8.0'
            os: macos-11
          - php: '8.0'
            mode: high-deps
            os: ubuntu-20.04
          - php: '8.1'
            mode: low-deps
            os: ubuntu-20.04
          - php: '8.2'
            mode: experimental
            os: ubuntu-20.04
      fail-fast: false

    runs-on: "${{ matrix.os }}"

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

      - name: Configure for PHP >= 8.2
        if: "matrix.php >= '8.2'"
        run: |
          composer config platform.php 8.1.99

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          coverage: "none"
          ini-values: date.timezone=Europe/Paris,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1
          php-version: "${{ matrix.php }}"
          extensions: "${{ env.extensions }}"
          tools: flex

      - name: Install dependencies
        run: |
          composer update --no-progress --ansi

      - name: Run tests
        run: |
          vendor/bin/phpunit --verbose --coverage-clover=coverage.clover
Add step to install dependencies
ci: Add step to install dependencies
