name: Tests

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
  workflow_dispatch:

jobs:
  build:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      matrix:
        operating-system: [ubuntu-latest]
        php-version: ['8.0', '8.1']
    name: PHP ${{ matrix.php-version }} Test on ${{ matrix.operating-system }}
    steps:
    - uses: actions/checkout@v3

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php-version }}
        extensions: mbstring, intl
        ini-values: post_max_size=256M, short_open_tag=On
        coverage: xdebug

    - name: Validate composer.json and composer.lock
      run: composer validate

    - name: Install dependencies
      run: composer update --no-progress --no-suggest
    
    - name: Run static checks
      run: composer check

    - name: Run test suite
      run: composer test-ci

    - name: Upload coverage to Codecov
      if: matrix.php-version == '8.1' &&  matrix.operating-system == 'ubuntu-latest'
      uses: codecov/codecov-action@v3
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        file: ./report/coverage.xml
        flags: unittests

name: Tests

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
  workflow_dispatch:

jobs:
  build:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      matrix:
        operating-system: [ubuntu-latest]
        php-version: ['8.0', '8.1', '8.2']
    name: PHP ${{ matrix.php-version }} Test on ${{ matrix.operating-system }}
    steps:
    - uses: actions/checkout@v3

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php-version }}
        extensions: mbstring, intl
        ini-values: post_max_size=256M, short_open_tag=On
        coverage: xdebug

    - name: Validate composer.json and composer.lock
      run: composer validate

    - name: Install dependencies
      run: composer update --no-progress --no-suggest
    
    - name: Run static checks
      run: composer check

    - name: Run test suite
      run: composer test-ci

    - name: Upload coverage to Codecov
      if: matrix.php-version == '8.1' &&  matrix.operating-system == 'ubuntu-latest'
      uses: codecov/codecov-action@v3
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        file: ./report/coverage.xml
        flags: unittests

Add PHP 8.2 into CI flow
Add PHP 8.2 into CI flow
