1name: PHP Code Style 2 3on: 4 push: 5 branches-ignore: 6 - stable 7 - old-stable 8 pull_request: 9 10permissions: 11 contents: read # to fetch code (actions/checkout) 12 13jobs: 14 phpcs: 15 name: PHP CodeSniffer 16 runs-on: ubuntu-latest 17 if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 18 steps: 19 - uses: actions/checkout@v2 20 21 - name: Setup PHP 22 uses: shivammathur/setup-php@v2 23 with: 24 php-version: '7.4' 25 tools: cs2pr, phpcs 26 27 - name: run PHP codesniffer 28 run: phpcs -q --standard=_test/phpcs_MigrationAdjustments.xml --report=checkstyle | cs2pr 29