@@ -9,112 +9,6 @@ on: # yamllint disable-line rule:truthy
9
9
- " main"
10
10
11
11
jobs :
12
- coding-standards :
13
- name : " Coding Standards"
14
-
15
- runs-on : " ubuntu-latest"
16
-
17
- strategy :
18
- matrix :
19
- php-version :
20
- - " 7.1"
21
-
22
- steps :
23
- - name : " Checkout"
24
- uses : " actions/checkout@v2.3.1"
25
-
26
- - name : " Lint YAML files"
27
- uses : " ibiqlik/action-yamllint@v1"
28
- with :
29
- config_file : " .yamllint.yaml"
30
- file_or_dir : " ."
31
- strict : true
32
-
33
- - name : " Install PHP with extensions"
34
- uses : " shivammathur/setup-php@v2"
35
- with :
36
- coverage : " none"
37
- extensions : " ${{ env.PHP_EXTENSIONS }}"
38
- php-version : " ${{ matrix.php-version }}"
39
-
40
- - name : " Validate composer.json and composer.lock"
41
- run : " composer validate --strict"
42
-
43
- - name : " Run ergebnis/composer-normalize"
44
- run : " tools/composer-normalize --dry-run"
45
-
46
- - name : " Create cache directory for friendsofphp/php-cs-fixer"
47
- run : " mkdir -p .build/php-cs-fixer"
48
-
49
- - name : " Cache cache directory for friendsofphp/php-cs-fixer"
50
- uses : " actions/cache@v2"
51
- with :
52
- path : " .build/php-cs-fixer"
53
- key : " php-${{ matrix.php-version }}-php-cs-fixer-${{ hashFiles('tools/php-cs-fixer') }}"
54
- restore-keys : " php-${{ matrix.php-version }}-php-cs-fixer-"
55
-
56
- - name : " Run friendsofphp/php-cs-fixer"
57
- run : " tools/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose"
58
-
59
- static-code-analysis :
60
- name : " Static Code Analysis"
61
-
62
- runs-on : " ubuntu-latest"
63
-
64
- strategy :
65
- matrix :
66
- php-version :
67
- - " 7.4"
68
-
69
- dependencies :
70
- - " highest"
71
-
72
- steps :
73
- - name : " Checkout"
74
- uses : " actions/checkout@v2.3.1"
75
-
76
- - name : " Install PHP with extensions"
77
- uses : " shivammathur/setup-php@v2"
78
- with :
79
- coverage : " none"
80
- php-version : " ${{ matrix.php-version }}"
81
-
82
- - name : " Determine composer cache directory"
83
- id : " determine-composer-cache-directory"
84
- run : " echo \" ::set-output name=directory::$(composer config cache-dir)\" "
85
-
86
- - name : " Cache dependencies installed with composer"
87
- uses : " actions/cache@v2"
88
- with :
89
- path : " ${{ steps.determine-composer-cache-directory.outputs.directory }}"
90
- key : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
91
- restore-keys : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
92
-
93
- - name : " Install lowest dependencies from composer.json"
94
- if : " matrix.dependencies == 'lowest'"
95
- run : " composer update --no-interaction --no-progress --no-suggest --prefer-lowest"
96
-
97
- - name : " Install locked dependencies from composer.lock"
98
- if : " matrix.dependencies == 'locked'"
99
- run : " composer install --no-interaction --no-progress --no-suggest"
100
-
101
- - name : " Install highest dependencies from composer.json"
102
- if : " matrix.dependencies == 'highest'"
103
- run : " composer update --no-interaction --no-progress --no-suggest"
104
-
105
- - name : " Create cache directory for vimeo/psalm"
106
- run : " mkdir -p .build/psalm"
107
-
108
- - name : " Cache cache directory for vimeo/psalm"
109
- uses : " actions/cache@v2"
110
- with :
111
- path : " .build/psalm"
112
- key : " php-${{ matrix.php-version }}-psalm-${{ github.sha }}"
113
- restore-keys : " php-${{ matrix.php-version }}-psalm-"
114
-
115
- - name : " Run vimeo/psalm"
116
- run : " tools/psalm --config=psalm.xml --diff --diff-methods --shepherd --show-info=false --stats --threads=4"
117
-
118
12
backward-compatibility :
119
13
name : " Backward Compatibility"
120
14
@@ -139,22 +33,17 @@ jobs:
139
33
- name : " Run roave/backward-compatibility-check"
140
34
run : " tools/roave-backward-compatibility-check --from=1.0.0"
141
35
142
- tests :
143
- name : " Tests "
36
+ code-coverage :
37
+ name : " Code Coverage "
144
38
145
39
runs-on : " ubuntu-latest"
146
40
147
41
strategy :
148
42
matrix :
149
43
php-version :
150
- - " 7.1"
151
- - " 7.2"
152
- - " 7.3"
153
44
- " 7.4"
154
- - " 8.0"
155
45
156
46
dependencies :
157
- - " lowest"
158
47
- " highest"
159
48
160
49
steps :
164
53
- name : " Install PHP with extensions"
165
54
uses : " shivammathur/setup-php@v2"
166
55
with :
167
- coverage : " none "
56
+ coverage : " xdebug "
168
57
php-version : " ${{ matrix.php-version }}"
169
58
170
59
- name : " Determine composer cache directory"
@@ -190,65 +79,63 @@ jobs:
190
79
if : " matrix.dependencies == 'highest'"
191
80
run : " composer update --no-interaction --no-progress --no-suggest"
192
81
193
- - name : " Run tests with phpunit/phpunit"
194
- run : " vendor/bin/phpunit --configuration=phpunit.xml"
82
+ - name : " Dump Xdebug filter with phpunit/phpunit"
83
+ run : " vendor/bin/phpunit --configuration=phpunit.xml --dump-xdebug-filter=.build/phpunit/xdebug-filter.php "
195
84
196
- code-coverage :
197
- name : " Code Coverage"
85
+ - name : " Collect code coverage with Xdebug and phpunit/phpunit"
86
+ run : " vendor/bin/phpunit --configuration=phpunit.xml --coverage-clover=.build/logs/clover.xml --prepend=.build/phpunit/xdebug-filter.php"
87
+
88
+ - name : " Send code coverage report to Codecov.io"
89
+ env :
90
+ CODECOV_TOKEN : " ${{ secrets.CODECOV_TOKEN }}"
91
+ run : " bash <(curl -s https://codecov.io/bash)"
92
+
93
+ coding-standards :
94
+ name : " Coding Standards"
198
95
199
96
runs-on : " ubuntu-latest"
200
97
201
98
strategy :
202
99
matrix :
203
100
php-version :
204
- - " 7.4"
205
-
206
- dependencies :
207
- - " highest"
101
+ - " 7.1"
208
102
209
103
steps :
210
104
- name : " Checkout"
211
105
uses : " actions/checkout@v2.3.1"
212
106
107
+ - name : " Lint YAML files"
108
+ uses : " ibiqlik/action-yamllint@v1"
109
+ with :
110
+ config_file : " .yamllint.yaml"
111
+ file_or_dir : " ."
112
+ strict : true
113
+
213
114
- name : " Install PHP with extensions"
214
115
uses : " shivammathur/setup-php@v2"
215
116
with :
216
- coverage : " xdebug"
117
+ coverage : " none"
118
+ extensions : " ${{ env.PHP_EXTENSIONS }}"
217
119
php-version : " ${{ matrix.php-version }}"
218
120
219
- - name : " Determine composer cache directory"
220
- id : " determine-composer-cache-directory"
221
- run : " echo \" ::set-output name=directory::$(composer config cache-dir)\" "
222
-
223
- - name : " Cache dependencies installed with composer"
224
- uses : " actions/cache@v2"
225
- with :
226
- path : " ${{ steps.determine-composer-cache-directory.outputs.directory }}"
227
- key : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
228
- restore-keys : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
229
-
230
- - name : " Install lowest dependencies from composer.json"
231
- if : " matrix.dependencies == 'lowest'"
232
- run : " composer update --no-interaction --no-progress --no-suggest --prefer-lowest"
233
-
234
- - name : " Install locked dependencies from composer.lock"
235
- if : " matrix.dependencies == 'locked'"
236
- run : " composer install --no-interaction --no-progress --no-suggest"
121
+ - name : " Validate composer.json and composer.lock"
122
+ run : " composer validate --strict"
237
123
238
- - name : " Install highest dependencies from composer.json"
239
- if : " matrix.dependencies == 'highest'"
240
- run : " composer update --no-interaction --no-progress --no-suggest"
124
+ - name : " Run ergebnis/composer-normalize"
125
+ run : " tools/composer-normalize --dry-run"
241
126
242
- - name : " Dump Xdebug filter with phpunit/phpunit "
243
- run : " vendor/bin/phpunit --configuration=phpunit.xml --dump-xdebug-filter= .build/phpunit/xdebug-filter. php"
127
+ - name : " Create cache directory for friendsofphp/php-cs-fixer "
128
+ run : " mkdir -p .build/php-cs-fixer "
244
129
245
- - name : " Collect code coverage with Xdebug and phpunit/phpunit"
246
- run : " vendor/bin/phpunit --configuration=phpunit.xml --coverage-clover=.build/logs/clover.xml --prepend=.build/phpunit/xdebug-filter.php"
130
+ - name : " Cache cache directory for friendsofphp/php-cs-fixer"
131
+ uses : " actions/cache@v2"
132
+ with :
133
+ path : " .build/php-cs-fixer"
134
+ key : " php-${{ matrix.php-version }}-php-cs-fixer-${{ hashFiles('tools/php-cs-fixer') }}"
135
+ restore-keys : " php-${{ matrix.php-version }}-php-cs-fixer-"
247
136
248
- - name : " Send code coverage report to Codecov.io"
249
- env :
250
- CODECOV_TOKEN : " ${{ secrets.CODECOV_TOKEN }}"
251
- run : " bash <(curl -s https://codecov.io/bash)"
137
+ - name : " Run friendsofphp/php-cs-fixer"
138
+ run : " tools/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose"
252
139
253
140
merge :
254
141
name : " Merge"
@@ -343,3 +230,116 @@ jobs:
343
230
pull_number: pullRequest.number,
344
231
repo: repository.repo,
345
232
})
233
+
234
+ static-code-analysis :
235
+ name : " Static Code Analysis"
236
+
237
+ runs-on : " ubuntu-latest"
238
+
239
+ strategy :
240
+ matrix :
241
+ php-version :
242
+ - " 7.4"
243
+
244
+ dependencies :
245
+ - " highest"
246
+
247
+ steps :
248
+ - name : " Checkout"
249
+ uses : " actions/checkout@v2.3.1"
250
+
251
+ - name : " Install PHP with extensions"
252
+ uses : " shivammathur/setup-php@v2"
253
+ with :
254
+ coverage : " none"
255
+ php-version : " ${{ matrix.php-version }}"
256
+
257
+ - name : " Determine composer cache directory"
258
+ id : " determine-composer-cache-directory"
259
+ run : " echo \" ::set-output name=directory::$(composer config cache-dir)\" "
260
+
261
+ - name : " Cache dependencies installed with composer"
262
+ uses : " actions/cache@v2"
263
+ with :
264
+ path : " ${{ steps.determine-composer-cache-directory.outputs.directory }}"
265
+ key : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
266
+ restore-keys : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
267
+
268
+ - name : " Install lowest dependencies from composer.json"
269
+ if : " matrix.dependencies == 'lowest'"
270
+ run : " composer update --no-interaction --no-progress --no-suggest --prefer-lowest"
271
+
272
+ - name : " Install locked dependencies from composer.lock"
273
+ if : " matrix.dependencies == 'locked'"
274
+ run : " composer install --no-interaction --no-progress --no-suggest"
275
+
276
+ - name : " Install highest dependencies from composer.json"
277
+ if : " matrix.dependencies == 'highest'"
278
+ run : " composer update --no-interaction --no-progress --no-suggest"
279
+
280
+ - name : " Create cache directory for vimeo/psalm"
281
+ run : " mkdir -p .build/psalm"
282
+
283
+ - name : " Cache cache directory for vimeo/psalm"
284
+ uses : " actions/cache@v2"
285
+ with :
286
+ path : " .build/psalm"
287
+ key : " php-${{ matrix.php-version }}-psalm-${{ github.sha }}"
288
+ restore-keys : " php-${{ matrix.php-version }}-psalm-"
289
+
290
+ - name : " Run vimeo/psalm"
291
+ run : " tools/psalm --config=psalm.xml --diff --diff-methods --shepherd --show-info=false --stats --threads=4"
292
+
293
+ tests :
294
+ name : " Tests"
295
+
296
+ runs-on : " ubuntu-latest"
297
+
298
+ strategy :
299
+ matrix :
300
+ php-version :
301
+ - " 7.1"
302
+ - " 7.2"
303
+ - " 7.3"
304
+ - " 7.4"
305
+ - " 8.0"
306
+
307
+ dependencies :
308
+ - " lowest"
309
+ - " highest"
310
+
311
+ steps :
312
+ - name : " Checkout"
313
+ uses : " actions/checkout@v2.3.1"
314
+
315
+ - name : " Install PHP with extensions"
316
+ uses : " shivammathur/setup-php@v2"
317
+ with :
318
+ coverage : " none"
319
+ php-version : " ${{ matrix.php-version }}"
320
+
321
+ - name : " Determine composer cache directory"
322
+ id : " determine-composer-cache-directory"
323
+ run : " echo \" ::set-output name=directory::$(composer config cache-dir)\" "
324
+
325
+ - name : " Cache dependencies installed with composer"
326
+ uses : " actions/cache@v2"
327
+ with :
328
+ path : " ${{ steps.determine-composer-cache-directory.outputs.directory }}"
329
+ key : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
330
+ restore-keys : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
331
+
332
+ - name : " Install lowest dependencies from composer.json"
333
+ if : " matrix.dependencies == 'lowest'"
334
+ run : " composer update --no-interaction --no-progress --no-suggest --prefer-lowest"
335
+
336
+ - name : " Install locked dependencies from composer.lock"
337
+ if : " matrix.dependencies == 'locked'"
338
+ run : " composer install --no-interaction --no-progress --no-suggest"
339
+
340
+ - name : " Install highest dependencies from composer.json"
341
+ if : " matrix.dependencies == 'highest'"
342
+ run : " composer update --no-interaction --no-progress --no-suggest"
343
+
344
+ - name : " Run tests with phpunit/phpunit"
345
+ run : " vendor/bin/phpunit --configuration=phpunit.xml"
0 commit comments