diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1744b602ca..61fcbcec0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -232,16 +232,13 @@ jobs: PHP_CODESNIFFER_CBF: '1' - name: 'PHPCS: check code style without cache, no parallel' - if: ${{ matrix.custom_ini == false && matrix.php != '7.4' }} - run: php "bin/phpcs" --no-cache --parallel=1 - - - name: 'PHPCS: check code style to show results in PR' - if: ${{ matrix.custom_ini == false && matrix.php == '7.4' }} id: phpcs - run: php "bin/phpcs" --no-cache --parallel=1 --report-full --report-checkstyle=./phpcs-report.xml + run: > + php "bin/phpcs" --no-cache --parallel=1 + ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' && '--report-full --report-checkstyle=./phpcs-report.xml' || '' }} - name: Show PHPCS results in PR - if: ${{ always() && steps.phpcs.outcome == 'failure' && matrix.php == '7.4' }} + if: ${{ always() && steps.phpcs.outcome == 'failure' && matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} run: cs2pr ./phpcs-report.xml - name: Download the PHPCS phar @@ -294,14 +291,11 @@ jobs: uses: actions/checkout@v4 - name: Setup ini config - if: ${{ matrix.os != 'windows-latest' }} + if: ${{ matrix.custom_ini == true && matrix.os != 'windows-latest' }} id: set_ini shell: bash run: | - # Set the "short_open_tag" ini to make sure specific conditions are tested. - if [[ ${{ matrix.custom_ini }} == true && "${{ matrix.php }}" == '7.2' ]]; then - echo 'PHP_INI=, date.timezone=Australia/Sydney, short_open_tag=On' >> "$GITHUB_OUTPUT" - fi + echo 'PHP_INI=, date.timezone=Australia/Sydney, short_open_tag=On' >> "$GITHUB_OUTPUT" - name: Install PHP uses: shivammathur/setup-php@v2