diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 2952a43c..ba5fee88 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -22,7 +22,15 @@ jobs: - name: Run PHPCS (changed lines only) run: | if [ "${{ github.event_name }}" = "pull_request" ]; then - vendor/bin/phpcs-changed --git --git-base "${{ github.event.pull_request.base.sha }}" + BASE="${{ github.event.pull_request.base.sha }}" else - vendor/bin/phpcs-changed --git --git-base "${{ github.event.before }}" + BASE="${{ github.event.before }}" fi + FILES=$(git diff --name-only --diff-filter=d "$BASE" HEAD -- '*.php') + if [ -z "$FILES" ]; then + echo "No PHP files changed, skipping PHPCS." + exit 0 + fi + echo "Changed PHP files:" + echo "$FILES" + echo "$FILES" | xargs vendor/bin/phpcs-changed --git --git-base "$BASE" diff --git a/phpunit.11.xml.dist b/phpunit.11.xml.dist index b227c998..2a2267c3 100644 --- a/phpunit.11.xml.dist +++ b/phpunit.11.xml.dist @@ -12,7 +12,6 @@ displayDetailsOnTestsThatTriggerNotices="true" displayDetailsOnTestsThatTriggerWarnings="true" failOnDeprecation="true" - failOnEmptyTestSuite="true" failOnPhpunitDeprecation="true" failOnNotice="true" failOnRisky="true" diff --git a/phpunit.12.xml.dist b/phpunit.12.xml.dist index b227c998..2a2267c3 100644 --- a/phpunit.12.xml.dist +++ b/phpunit.12.xml.dist @@ -12,7 +12,6 @@ displayDetailsOnTestsThatTriggerNotices="true" displayDetailsOnTestsThatTriggerWarnings="true" failOnDeprecation="true" - failOnEmptyTestSuite="true" failOnPhpunitDeprecation="true" failOnNotice="true" failOnRisky="true"