1name: PHP Code Style 2 3on: [ push, pull_request, workflow_dispatch ] 4 5jobs: 6 phpcs: 7 name: PHP CodeSniffer 8 runs-on: ubuntu-latest 9 steps: 10 - uses: actions/checkout@v5 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 -v --standard=_test/phpcs_MigrationAdjustments.xml --report-full --report-checkstyle=./phpcs-report.xml lib/plugins/openlayersmap 30 31 - name: Annotate PR 32 if: ${{ always() && steps.phpcs.outcome == 'failure' }} 33 run: cs2pr --notices-as-warnings --colorize ./phpcs-report.xml 34