Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ jobs:
php-version: ${{ matrix.php }}
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
coverage: none
tools: cs2pr

- name: "DEBUG: show libxml loaded version (php)"
run: php -r 'echo "libxml loaded version = ", LIBXML_LOADED_VERSION, PHP_EOL;'
Expand Down Expand Up @@ -240,14 +239,7 @@ jobs:

- name: 'PHPCS: check code style without cache, no parallel'
if: ${{ matrix.custom_ini == false }}
id: phpcs
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.os == 'ubuntu-latest' && matrix.php == '8.4' }}
run: cs2pr ./phpcs-report.xml
run: php "bin/phpcs" --no-cache --parallel=1

- name: Download the PHPCS phar
if: ${{ matrix.custom_ini == false }}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,32 @@ concurrency:
cancel-in-progress: true

jobs:
phpcs:
name: Check PHP code style
runs-on: ubuntu-latest

# Don't run the cronjob in this workflow on forks.
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards')

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 'latest'
coverage: none
tools: cs2pr

- name: Check PHP code style
id: phpcs
run: php "bin/phpcs" --report-full --report-checkstyle=./phpcs-report.xml

- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml

checkxml:
name: Check XML files
runs-on: ubuntu-latest
Expand Down