forked from nunomaduro/phpinsights
-
Notifications
You must be signed in to change notification settings - Fork 0
164 lines (158 loc) · 7.49 KB
/
frameworks.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: Popular frameworks
on:
push:
branches:
- master
pull_request: ~
jobs:
symfony:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
version: ['^5.4', '@stable', '@dev'] # Test current LTS, current release, and future release
php: ['7.4', '8.0', '8.1', '8.2', '8.3']
composer-version: [v2]
include:
- version: '^5.4'
psr-simple-cache-version: '^1.0|^2.0'
- version: '@stable'
psr-simple-cache-version: '^1.0|^2.0|^3.0'
- version: '@dev'
psr-simple-cache-version: '^1.0|^2.0|^3.0'
env:
allow_failure: ${{ matrix.version == '@dev' }}
name: "Symfony skeleton:${{ matrix.version }} - PHP${{ matrix.php }} - Composer ${{ matrix.composer-version }}"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: phpinsights
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, zip
coverage: none
tools: composer:${{ matrix.composer-version }}
- name: Install Symfony Skeleton
run: composer create-project --no-progress --ansi symfony/skeleton:${{matrix.version}} project
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Improve composer
working-directory: ./project
run: |
composer config name phpinsights/symfony-tester
composer config description "Symfony test"
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Linking library
working-directory: ./project
run: |
composer config repositories.phpinsights '{"type":"path", "url": "../phpinsights/", "options":{"symlink": false}}'
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Composer config
working-directory: ./project
run: |
composer config prefer-stable true
composer config minimum-stability dev
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Require psr/simple-cache
working-directory: ./project
run: composer require "psr/simple-cache:${{ matrix.psr-simple-cache-version }}"
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Allow plugin
working-directory: ./project
run: composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Install PHPInsights
working-directory: ./project
run: composer require --dev "nunomaduro/phpinsights:*" -n --ansi --with-all-dependencies
continue-on-error: true
- name: Launch PHPInsights
working-directory: ./project
run: php vendor/bin/phpinsights -n --disable-security-check --ansi
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Launch PHPInsights Fixer
working-directory: ./project
run: php vendor/bin/phpinsights fix -n --ansi
continue-on-error: ${{ env.allow_failure == 'true' }}
laravel:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
version: ['^10.0', '^9.0', '^8.0']
php: ['7.4', '8.0', '8.1', '8.2', '8.3']
composer-version: [v2]
include:
- version: '^10.0'
phpunit: '^10.0'
- version: '^9.0'
phpunit: '^9.0'
- version: '^8.0'
phpunit: '^9.0'
exclude:
- version: '^9.0'
php: '7.4'
- version: '^10.0'
php: '7.4'
- version: '^10.0'
php: '8.0'
name: "Laravel:${{ matrix.version }} - PHP${{ matrix.php }} - Composer ${{ matrix.composer-version }}"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: phpinsights
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, zip
coverage: none
tools: composer:${{ matrix.composer-version }}
- name: Install Laravel
run: composer create-project --prefer-dist --no-progress --ansi laravel/laravel:${{matrix.version}} project
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Improve composer
working-directory: ./project
run: |
composer config name phpinsights/laravel-tester
composer config description "laravel test"
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Linking library
working-directory: ./project
run: |
composer config repositories.phpinsights '{"type":"path", "url": "../phpinsights/", "options":{"symlink": false}}'
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Composer config
working-directory: ./project
run: |
composer config prefer-stable true
composer config minimum-stability dev
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Require phpunit
working-directory: ./project
run: composer require --dev phpunit/phpunit:${{ matrix.phpunit }} --update-with-dependencies -n --ansi
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Allow plugin
working-directory: ./project
run: composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Install PHPInsights
working-directory: ./project
run: composer require --dev "nunomaduro/phpinsights:*" -n --ansi --with-all-dependencies
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Artisan publish
working-directory: ./project
run: php artisan vendor:publish --provider="NunoMaduro\PhpInsights\Application\Adapters\Laravel\InsightsServiceProvider" --ansi
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Launch PHPInsights
working-directory: ./project
run: php artisan insights -n --disable-security-check --ansi
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Launch PHPInsights Fixer
working-directory: ./project
run: php artisan insights -n --ansi --fix --disable-security-check
continue-on-error: ${{ env.allow_failure == 'true' }}