diff --git a/action.yml b/action.yml index df6a81f..3b94ba0 100644 --- a/action.yml +++ b/action.yml @@ -86,10 +86,17 @@ runs: # --verbose option removed in PHPUnit 10, as it's now always verbose PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --verbose" fi - # --display-phpunit-deprecations option added in PHPUnit 11.3.3 - # deprecations will display by default in PHPUnit <= 11.3.2 if (( "$INT_VERSION" >= 110303 )); then + # --display-phpunit-deprecations option added in PHPUnit 11.3.3 + # deprecations will display by default in PHPUnit <= 11.3.2 PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --display-phpunit-deprecations" + # Special filtering for silverstripe/framework testsuites (--exclude-filter added in PHPUnit 11) + 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 if [[ "$PHPUNIT_SUITE" != "all" ]] && [[ "$PHPUNIT_SUITE" != "" ]]; then PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --testsuite "$PHPUNIT_SUITE"" @@ -97,13 +104,6 @@ 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/" - fi echo "PHPUNIT_OPTIONS is $PHPUNIT_OPTIONS" vendor/bin/phpunit $PHPUNIT_OPTIONS echo "Passed"