-
-
Notifications
You must be signed in to change notification settings - Fork 143
67 lines (52 loc) · 1.84 KB
/
coding-standards.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
56
57
58
59
60
61
62
63
64
65
66
67
name: Coding Standards
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
Scan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [5.6, 7.4, '8.0', 8.1, 8.2, 8.3, 8.4]
name: PHP ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:2.2
coverage: none
- name: Install dependencies for PHP 5.6
run: composer update --quiet --no-scripts
if: matrix.php == 5.6
- name: Install dependencies for PHP 7.4+
run: composer install --quiet --no-scripts
if: matrix.php >= 7.4
- name: Execute tests
run: vendor/bin/phpunit --verbose
- name: Install additional dependencies
run: |
composer config allow-plugins.bamarni/composer-bin-plugin true --no-plugins
composer require bamarni/composer-bin-plugin rector/rector squizlabs/php_codesniffer --dev --quiet --no-scripts
composer bin easy-coding-standard config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer bin easy-coding-standard require symplify/easy-coding-standard slevomat/coding-standard --dev --quiet --no-scripts
if: matrix.php == 8.3
- name: Execute PHPCodeSniffer
run: vendor/bin/phpcs -n -s --standard=PSR12 src
if: matrix.php == 8.3
- name: Execute Rector
run: vendor/bin/rector process src --dry-run
if: matrix.php == 8.3
- name: Execute ECS
run: vendor/bin/ecs check src
if: matrix.php == 8.3
- name: Execute PHPStan
run: vendor/bin/phpstan analyse src
if: matrix.php == 8.3