feat(tests): Fail on PHPUnit warnings and risky tests, show deprecations

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/54905/head
Côme Chilliet 1 month ago
parent 9fc64423a5
commit 1bbf12c465
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
  1. 4
      autotest.sh
  2. 4
      composer.json

@ -396,8 +396,8 @@ function execute_tests {
echo "No coverage"
fi
echo "$PHPUNIT" --colors=always --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
"$PHPUNIT" --colors=always --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
echo "$PHPUNIT" --fail-on-warning --fail-on-risky --display-deprecations --display-phpunit-deprecations --colors=always --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
"$PHPUNIT" --fail-on-warning --fail-on-risky --display-deprecations --display-phpunit-deprecations --colors=always --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
RESULT=$?
if [ "$PRIMARY_STORAGE_CONFIG" == "swift" ] ; then

@ -68,9 +68,9 @@
"Composer\\Config::disableProcessTimeout",
"PHP_CLI_SERVER_WORKERS=${NEXTCLOUD_WORKERS:=4} php -S ${NEXTCLOUD_HOST:=localhost}:${NEXTCLOUD_PORT:=8080} -t ./"
],
"test": "phpunit --colors=always --configuration tests/phpunit-autotest.xml",
"test": "phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest.xml",
"test:db": "@composer run test -- --group DB,SLOWDB",
"test:files_external": "phpunit --colors=always --configuration tests/phpunit-autotest-external.xml",
"test:files_external": "phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest-external.xml",
"rector": "rector --config=build/rector.php && composer cs:fix",
"openapi": "./build/openapi-checker.sh"
},

Loading…
Cancel
Save