summaryrefslogtreecommitdiff
path: root/.github/workflows/phpstan.yaml
blob: 5342a38262f58f7e9b1e899e0330b352afc6ac1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: Static analysis

on: [push, pull_request]

jobs:
  run:
    if: ${{ !startsWith(github.event.head_commit.message, 'Translation:') }}

    runs-on: ${{ matrix.operating-system }}

    strategy:
        matrix:
          operating-system: [ubuntu-latest]
          php-version: ['7.4', '8.0', '8.1']

    name: phpstan

    steps:
      - uses: actions/checkout@v2

      - run: composer validate

      - run: composer global require phpstan/phpstan phpstan/extension-installer phpstan/phpstan-deprecation-rules phpstan/phpstan-strict-rules phpstan/phpstan-phpunit

      - run: composer install --no-progress

      - run: ~/.composer/vendor/bin/phpstan analyze --no-progress --level=max app modules_v4 index.php