Skip to content

Commit

Permalink
FIX Don't use --exclude-filter for PHPUnit 9
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 30, 2024
1 parent a08a8c0 commit aa6c543
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ runs:
if [[ "${{ inputs.phpunit_fail_on_warning }}" == "true" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --fail-on-warning"
fi
# Special filtering for silverstripe/framework testsuites
if [[ "$PHPUNIT_SUITE" == "framework-orm" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --filter /ORM/"
fi
if [[ "$PHPUNIT_SUITE" == "framework-core" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --exclude-filter /ORM/"
# --exclude-filter added in PHPUnit 11
if (( "$INT_VERSION" >= 110300 )); then
# Special filtering for silverstripe/framework testsuites
if [[ "$PHPUNIT_SUITE" == "framework-orm" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --filter /ORM/"
fi
if [[ "$PHPUNIT_SUITE" == "framework-core" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --exclude-filter /ORM/"
fi
fi
echo "PHPUNIT_OPTIONS is $PHPUNIT_OPTIONS"
vendor/bin/phpunit $PHPUNIT_OPTIONS
Expand Down

0 comments on commit aa6c543

Please sign in to comment.