xref: /webtrees/.github/workflows/phpcs.yaml (revision f78da6783564bad54411db0835818007bfdbaec8)
1name: Code style
2
3on: [push, pull_request]
4
5jobs:
6  run:
7    if: ${{ !startsWith(github.event.head_commit.message, 'Translation:') }}
8    runs-on: ${{ matrix.operating-system }}
9    name: PHP/PHTML/CSS
10
11    strategy:
12      matrix:
13        operating-system: ['ubuntu-latest']
14        php-version: ['8.0']
15
16    steps:
17      - uses: actions/checkout@v2
18
19      - run: composer validate
20
21      - run: composer global require squizlabs/php_codesniffer
22
23      - name: PHP
24        run: ~/.composer/vendor/bin/phpcs --colors --standard=PSR12 --exclude=Generic.Files.LineLength --extensions=php index.php app modules_v4 tests
25
26      - name: Style sheets
27        run: ~/.composer/vendor/bin/phpcs --colors --extensions=css resources/css
28