File tree 2 files changed +27
-9
lines changed
2 files changed +27
-9
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,6 @@ jobs:
195
195
php-version : ${{ matrix.php }}
196
196
ini-values : ${{ steps.set_ini.outputs.PHP_INI }}
197
197
coverage : none
198
- tools : cs2pr
199
198
200
199
- name : " DEBUG: show libxml loaded version (php)"
201
200
run : php -r 'echo "libxml loaded version = ", LIBXML_LOADED_VERSION, PHP_EOL;'
@@ -240,14 +239,7 @@ jobs:
240
239
241
240
- name : ' PHPCS: check code style without cache, no parallel'
242
241
if : ${{ matrix.custom_ini == false }}
243
- id : phpcs
244
- run : >
245
- php "bin/phpcs" --no-cache --parallel=1
246
- ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' && '--report-full --report-checkstyle=./phpcs-report.xml' || '' }}
247
-
248
- - name : Show PHPCS results in PR
249
- if : ${{ always() && steps.phpcs.outcome == 'failure' && matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }}
250
- run : cs2pr ./phpcs-report.xml
242
+ run : php "bin/phpcs" --no-cache --parallel=1
251
243
252
244
- name : Download the PHPCS phar
253
245
if : ${{ matrix.custom_ini == false }}
Original file line number Diff line number Diff line change @@ -17,6 +17,32 @@ concurrency:
17
17
cancel-in-progress : true
18
18
19
19
jobs :
20
+ phpcs :
21
+ name : Check PHP code style
22
+ runs-on : ubuntu-latest
23
+
24
+ # Don't run the cronjob in this workflow on forks.
25
+ if : github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards')
26
+
27
+ steps :
28
+ - name : Checkout code
29
+ uses : actions/checkout@v4
30
+
31
+ - name : Install PHP
32
+ uses : shivammathur/setup-php@v2
33
+ with :
34
+ php-version : ' latest'
35
+ coverage : none
36
+ tools : cs2pr
37
+
38
+ - name : Check PHP code style
39
+ id : phpcs
40
+ run : php "bin/phpcs" --report-full --report-checkstyle=./phpcs-report.xml
41
+
42
+ - name : Show PHPCS results in PR
43
+ if : ${{ always() && steps.phpcs.outcome == 'failure' }}
44
+ run : cs2pr ./phpcs-report.xml
45
+
20
46
checkxml :
21
47
name : Check XML files
22
48
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments