name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest    
    strategy:
      matrix:
        php-versions: ['7.2', '7.3', '7.4', '8.0']
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
    - uses: actions/checkout@v3

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php-versions }}

    - name: Check syntax error in sources
      run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l

    - name: Clear cache of Composer
      run: composer clear-cache

    - name: Validate Composer.json and composer.lock
      run: composer update

    - name: Install dependencies
      run: composer install -q -n -a --no-progress --prefer-dist

    - name: Check code styles
      continue-on-error: true
      run: ./vendor/bin/phpcs

    - name: Run QA Scripts from composer.json
      run: composer qa

name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest    
    strategy:
      matrix:
        php-versions: ['7.4', '8.0', '8.1']
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
    - uses: actions/checkout@v3

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php-versions }}

    - name: Check syntax error in sources
      run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l

    - name: Clear cache of Composer
      run: composer clear-cache

    - name: Validate Composer.json and composer.lock
      run: composer update

    - name: Install dependencies
      run: composer install -q -n -a --no-progress --prefer-dist

    - name: Check code styles
      continue-on-error: true
      run: ./vendor/bin/phpcs

    - name: Run QA Scripts from composer.json
      run: composer qa

Update php versions for testing
Update php versions for testing