name: Tests

on:
  - push
  - pull_request

jobs:
  tests:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
        php: ['7.1', '7.2', '7.3', '7.4', '8.0']

      fail-fast: false

    name: PHP ${{ matrix.php }} tests on ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
      - uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: tokenizer
          coverage: none

      - run: composer install --no-progress --prefer-dist
      - run: vendor/bin/tester tests -s -C
      - if: failure()
        uses: actions/upload-artifact@v2
        with:
          name: output
          path: tests/**/output

name: Tests

on:
  - push
  - pull_request

jobs:
  tests:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
        php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']

      fail-fast: false

    name: PHP ${{ matrix.php }} tests on ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v3
      - uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: tokenizer
          coverage: none

      - run: composer install --no-progress --prefer-dist
      - run: vendor/bin/tester tests -s -C
      - if: failure()
        uses: actions/upload-artifact@v3
        with:
          name: output
          path: tests/**/output

Test in PHP 8.1 and 8.2
CI: Test in PHP 8.1 and 8.2
