xref: /webtrees/.github/workflows/phpstan.yaml (revision 24931b29a0237a5f5f1b8620af661ea530451af0)
1name: Static analysis
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: phpstan
10
11    strategy:
12      matrix:
13        operating-system: [ubuntu-latest]
14        php-version: ['8.1', '8.2', '8.3', '8.4']
15      fail-fast: false
16
17    steps:
18      - uses: shivammathur/setup-php@v2
19        with:
20          php-version: ${{ matrix.php-version }}
21
22      - uses: actions/checkout@v4
23
24      - run: composer validate
25
26      - run: composer global config --no-plugins allow-plugins.phpstan/extension-installer true
27
28      - run: composer global require phpstan/phpstan phpstan/extension-installer phpstan/phpstan-deprecation-rules phpstan/phpstan-strict-rules phpstan/phpstan-phpunit
29
30      - run: composer install --no-progress
31
32      - run: ~/.composer/vendor/bin/phpstan analyze --no-progress --level=max app index.php
33