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