Skip to content

Commit f5f3b23

Browse files
authored
Merge pull request #861 from PHPCSStandards/feature/ghactions-minor-simplifications
GH Actions/test: minor simplifications
2 parents d78846e + 1099560 commit f5f3b23

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 12 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
@@ -294,14 +291,11 @@ jobs:
294291
uses: actions/checkout@v4
295292

296293
- name: Setup ini config
297-
if: ${{ matrix.os != 'windows-latest' }}
294+
if: ${{ matrix.custom_ini == true && matrix.os != 'windows-latest' }}
298295
id: set_ini
299296
shell: bash
300297
run: |
301-
# Set the "short_open_tag" ini to make sure specific conditions are tested.
302-
if [[ ${{ matrix.custom_ini }} == true && "${{ matrix.php }}" == '7.2' ]]; then
303-
echo 'PHP_INI=, date.timezone=Australia/Sydney, short_open_tag=On' >> "$GITHUB_OUTPUT"
304-
fi
298+
echo 'PHP_INI=, date.timezone=Australia/Sydney, short_open_tag=On' >> "$GITHUB_OUTPUT"
305299
306300
- name: Install PHP
307301
uses: shivammathur/setup-php@v2

0 commit comments

Comments
 (0)