Skip to content

Commit 1d086ad

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 d78846e commit 1d086ad

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
@@ -232,16 +232,13 @@ jobs:
232232
PHP_CODESNIFFER_CBF: '1'
233233

234234
- name: 'PHPCS: check code style without cache, no parallel'
235-
if: ${{ matrix.custom_ini == false && matrix.php != '7.4' }}
236-
run: php "bin/phpcs" --no-cache --parallel=1
237-
238-
- name: 'PHPCS: check code style to show results in PR'
239-
if: ${{ matrix.custom_ini == false && matrix.php == '7.4' }}
240235
id: phpcs
241-
run: php "bin/phpcs" --no-cache --parallel=1 --report-full --report-checkstyle=./phpcs-report.xml
236+
run: >
237+
php "bin/phpcs" --no-cache --parallel=1
238+
${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' && '--report-full --report-checkstyle=./phpcs-report.xml' || '' }}
242239
243240
- name: Show PHPCS results in PR
244-
if: ${{ always() && steps.phpcs.outcome == 'failure' && matrix.php == '7.4' }}
241+
if: ${{ always() && steps.phpcs.outcome == 'failure' && matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }}
245242
run: cs2pr ./phpcs-report.xml
246243

247244
- name: Download the PHPCS phar

0 commit comments

Comments
 (0)