aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/phpCS.yml
blob: b0ebe6998f09cd8d89634c4e737b130c50a636ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
name: PHP Code Style

on: [push, pull_request]

jobs:
    phpcs:
        name: PHP CodeSniffer
        runs-on: ubuntu-latest
        if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
        steps:
            - uses: actions/checkout@v2

            - name: Setup PHP
              uses: shivammathur/setup-php@v2
              with:
                  php-version: '7.4'
                  tools: cs2pr, phpcs

            - name: run PHP codesniffer
              run: phpcs -q --standard=_test/phpcs_MigrationAdjustments.xml --report=checkstyle | cs2pr