Skip to content

Commit

Permalink
Make it so tests fail if PHP outputs warnings at startup (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati authored Apr 3, 2022
1 parent cb0c983 commit 2c5d484
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci-ext.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ pecl package /app/package.xml
MAKE="make -j$(nproc)" pecl install tensor-*.tgz
docker-php-ext-enable tensor
php --ri tensor

# Let's check that PHP doesn't output any warning
TENSOR_PHP_OUTPUT="$(php -r ';' 2>&1)"
if [ -n "$TENSOR_PHP_OUTPUT" ]; then
printf 'PHP displayed these warnings at startup:\n%s\n' "$TENSOR_PHP_OUTPUT" >&2
exit 1
fi

0 comments on commit 2c5d484

Please sign in to comment.