Skip to content

Commit 3419521

Browse files
committed
GH Actions/test: minor simplification [1]
* Fold two steps into one by using an inline condition. * Show the inline annotations for PHP 8.4 (faster) instead of PHP 7.4.
1 parent d9a1fab commit 3419521

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,13 @@ jobs:
204204
PHP_CODESNIFFER_CBF: '1'
205205

206206
- name: 'PHPCS: check code style without cache, no parallel'
207-
if: ${{ matrix.custom_ini == false && matrix.php != '7.4' }}
208-
run: php "bin/phpcs" --no-cache --parallel=1
209-
210-
- name: 'PHPCS: check code style to show results in PR'
211-
if: ${{ matrix.custom_ini == false && matrix.php == '7.4' }}
212207
id: phpcs
213-
run: php "bin/phpcs" --no-cache --parallel=1 --report-full --report-checkstyle=./phpcs-report.xml
208+
run: >
209+
php "bin/phpcs" --no-cache --parallel=1
210+
${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' && '--report-full --report-checkstyle=./phpcs-report.xml' || '' }}
214211
215212
- name: Show PHPCS results in PR
216-
if: ${{ always() && steps.phpcs.outcome == 'failure' && matrix.php == '7.4' }}
213+
if: ${{ always() && steps.phpcs.outcome == 'failure' && matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }}
217214
run: cs2pr ./phpcs-report.xml
218215

219216
- name: Download the PHPCS phar

0 commit comments

Comments
 (0)