-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (47 loc) · 1.85 KB
/
phpstan_entity.yml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: PHPStan - civiremote_entity
on:
pull_request:
paths:
- 'modules/civiremote_entity/src/**.php'
- modules/civiremote_entity/composer.json
- modules/civiremote_entity/tools/phpstan/composer.json
- modules/civiremote_entity/ci/composer.json
- modules/civiremote_entity/phpstan.ci.neon
- modules/civiremote_entity/phpstan.neon.dist
- 'src/**.php'
jobs:
phpstan:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.3']
prefer: ['prefer-stable', 'prefer-lowest']
name: PHPStan with PHP ${{ matrix.php-versions }} ${{ matrix.prefer }}
defaults:
run:
working-directory: modules/civiremote_entity
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
env:
fail-fast: true
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-${{ hashFiles('modules/civiremote_entity/**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
- name: Install dependencies
run: |
composer update --no-progress --prefer-dist --${{ matrix.prefer }} --optimize-autoloader &&
composer composer-phpstan -- update --no-progress --prefer-dist --optimize-autoloader &&
composer --working-dir=ci update --no-progress --prefer-dist --${{ matrix.prefer }} --optimize-autoloader
- name: Run PHPStan
run: composer phpstan -- analyse -c phpstan.ci.neon