xref: /webtrees/.github/workflows/phpcs.yaml (revision a2c8afeaa1dbe8a34f6b4e92d11e55c55d11cc7a)
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.1', '8.2', '8.3']
15
16    steps:
17      - uses: shivammathur/setup-php@master
18        with:
19          php-version: ${{ matrix.php-version }}
20
21      - uses: actions/checkout@v3
22
23      - run: composer validate
24
25      - run: composer global require squizlabs/php_codesniffer
26
27      - name: PHP
28        run: ~/.composer/vendor/bin/phpcs --colors --standard=PSR12 --exclude=Generic.Files.LineLength --extensions=php index.php app tests
29
30      - name: Style sheets
31        run: ~/.composer/vendor/bin/phpcs --colors --extensions=css resources/css
32