xref: /plugin/geophp/.github/workflows/phpCS.yml (revision 9810e469408c76592c0e9d67127d10caf24f0f98)
1name: PHP Code Style
2
3on: [ pull_request, workflow_dispatch ]
4
5jobs:
6  phpcs:
7    name: PHP CodeSniffer
8    runs-on: ubuntu-latest
9    steps:
10      - uses: actions/checkout@v4
11
12      - name: Setup PHP
13        uses: shivammathur/setup-php@v2
14        with:
15          php-version: '8.2'
16          tools: cs2pr, phpcs
17
18      - name: retrieve script
19        run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
20
21      - name: Install DokuWiki
22        env:
23          CI_SERVER: 1
24          DOKUWIKI: master
25        run: sh travis.sh
26
27      - name: run PHP codesniffer
28        continue-on-error: true
29        run: phpcs --standard=_test/phpcs_MigrationAdjustments.xml --report-full --report-checkstyle=./phpcs-report.xml lib/plugins/geophp/helper.php
30
31      - name: Annotate PR
32        run: cs2pr ./phpcs-report.xml
33