name: Continuous Integration
on: [push]

jobs:
    linter:
        name: Code style
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@master
            - uses: docker://composer
              with:
                  args: install
            - uses: docker://php:8.0-cli-alpine
              with:
                  entrypoint: vendor/bin/php-cs-fixer
                  args: fix -v --dry-run

    tests:
        name: Tests
        runs-on: ubuntu-latest
        strategy:
            matrix:
                version: ['7.3', '7.4', '8.0']
                flags: ['', '--prefer-lowest', '--prefer-stable']
        steps:
            - uses: actions/checkout@v2
            - uses: shivammathur/setup-php@v2
              with:
                  php-version: ${{ matrix.version }}
            - run: 'composer update --prefer-dist --no-interaction ${{ matrix.flags }}'
            - run: 'vendor/bin/phpunit'

name: Continuous Integration
on: [push]

jobs:
    linter:
        name: Code style
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@master
            - uses: shivammathur/setup-php@v2
              with:
                  php-version: 8.1
            - run: 'composer update --prefer-dist --no-interaction'
            - run: vendor/bin/php-cs-fixer fix -v --dry-run

    tests:
        name: Tests
        runs-on: ubuntu-latest
        strategy:
            matrix:
                version: ['7.3', '7.4', '8.0', '8.1', '8.2']
                flags: ['--prefer-lowest', '--prefer-stable']
        steps:
            - uses: actions/checkout@v2
            - uses: shivammathur/setup-php@v2
              with:
                  php-version: ${{ matrix.version }}
            - run: 'composer update --prefer-dist --no-interaction ${{ matrix.flags }}'
            - run: 'vendor/bin/phpunit'

Use shivamatur for PHP Github action
Use shivamatur for PHP Github action
