xref: /dokuwiki/.github/workflows/phpCS.yml (revision 455aa67e850e236be8cd442e32eec2b8fff15fb2)
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@v3
20              with:
21                  fetch-depth: 0
22
23            - name: Setup PHP
24              uses: shivammathur/setup-php@v2
25              with:
26                  php-version: '8.2'
27                  tools: cs2pr, phpcs
28
29            - name: run PHP codesniffer
30              run: phpcs -q --standard=_test/phpcs_MigrationAdjustments.xml
31