name: Tests

on:
  - "push"
  - "pull_request"

jobs:
  tests:

    runs-on: ubuntu-latest
    continue-on-error: "${{ matrix.php-versions == '8.2' }}"
    strategy:
      matrix:
        php-versions: ['8.0', '8.1', '8.2']

    steps:
    - uses: actions/checkout@v2

    - name: "Cache Composer packages"
      id: "composer-cache"
      uses: actions/cache@v2
      with:
        path: "vendor"
        key: ${{ runner.os }}-php-${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.lock') }}
        restore-keys: |
          "${{ runner.os }}-php-"

    - name: "Setup PHP Action"
      uses: "shivammathur/setup-php@v2"
      with:
        php-version: "${{ matrix.php-versions }}"
        extensions: "intl, xdebug"

    - name: "Install dependencies"
      if: steps.composer-cache.outputs.cache-hit != 'true' && matrix.php-versions != '8.2'
      run: composer install --prefer-dist --no-progress --no-suggest

    - name: "Install dependencies 8.1"
      if: steps.composer-cache.outputs.cache-hit != 'true' && matrix.php-versions == '8.2'
      run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs

    - name: "Unit + Integration"
      run: vendor/bin/phpunit
    
    - name: "Mutation tests"
      run: vendor/bin/infection --min-msi=97 --no-progress --threads=5

name: Tests

on:
  - "push"
  - "pull_request"

jobs:
  tests:

    runs-on: ubuntu-latest
    continue-on-error: "${{ matrix.php-versions == '8.2' }}"
    strategy:
      matrix:
        php-versions: ['8.0', '8.1', '8.2']

    steps:
    - uses: actions/checkout@v2

    - name: "Setup PHP Action"
      uses: "shivammathur/setup-php@v2"
      with:
        php-version: "${{ matrix.php-versions }}"
        extensions: "intl, xdebug"

    - name: "Install dependencies"
      uses: "ramsey/composer-install@v1"
      if: matrix.php-versions != '8.2'
      with:
        composer-options: "--prefer-dist --no-progress --no-suggest"

    - name: "Install dependencies 8.2"
      uses: "ramsey/composer-install@v1"
      if: matrix.php-versions == '8.2'
      with:
        composer-options: "--prefer-dist --no-progress --no-suggest --ignore-platform-reqs"

    - name: "Unit + Integration"
      run: vendor/bin/phpunit
    
    - name: "Mutation tests"
      run: vendor/bin/infection --min-msi=97 --no-progress --threads=5

Use ramsey/composer-install in test workflow
Use ramsey/composer-install in test workflow
