xref: /dokuwiki/.github/workflows/phpCS.yml (revision f588666679da2c0d91b4c86306d357afb715085e)
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@v4
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
28            - name: run PHP codesniffer
29              run: |
30                cd _test
31                composer install --no-interaction --no-progress --no-suggest --prefer-dist
32                composer run check
33