Skip to content

Commit 2c5d484

Browse files
authored
Make it so tests fail if PHP outputs warnings at startup (#29)
1 parent cb0c983 commit 2c5d484

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/ci-ext.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,10 @@ pecl package /app/package.xml
2424
MAKE="make -j$(nproc)" pecl install tensor-*.tgz
2525
docker-php-ext-enable tensor
2626
php --ri tensor
27+
28+
# Let's check that PHP doesn't output any warning
29+
TENSOR_PHP_OUTPUT="$(php -r ';' 2>&1)"
30+
if [ -n "$TENSOR_PHP_OUTPUT" ]; then
31+
printf 'PHP displayed these warnings at startup:\n%s\n' "$TENSOR_PHP_OUTPUT" >&2
32+
exit 1
33+
fi

0 commit comments

Comments
 (0)