xref: /dokuwiki/.github/workflows/phpCS.yml (revision 2b2e0eb4b772c1a2c4490fa8083bc7462501bf1d)
1name: PHP Code Style
2
3on:
4  push:
5    branches-ignore:
6      - stable
7      - old-stable
8  pull_request:
9
10concurrency:
11  group: ${{ github.workflow }}-${{ github.ref }}
12  cancel-in-progress: true
13
14permissions:
15  contents: read  #  to fetch code (actions/checkout)
16
17jobs:
18    phpcs:
19        name: PHP CodeSniffer
20        runs-on: ubuntu-latest
21        if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
22        steps:
23            - uses: actions/checkout@v4
24              with:
25                  fetch-depth: 0
26
27            - name: Setup PHP
28              uses: shivammathur/setup-php@v2
29              with:
30                  php-version: '8.2'
31
32            - name: run PHP codesniffer
33              run: |
34                cd _test
35                composer install --no-interaction --no-progress --no-suggest --prefer-dist
36                composer run check
37