From 08c07352ae613fdf3a1272af02784222deaf5071 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 4 Nov 2023 12:14:10 +0100 Subject: [PATCH] Check for github --- .ci/phpstan.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.ci/phpstan.sh b/.ci/phpstan.sh index 9a54435bb8..c5eca734c2 100755 --- a/.ci/phpstan.sh +++ b/.ci/phpstan.sh @@ -29,16 +29,17 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # cp .ci/.env.ci .env # Do static code analysis. -# ./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress -./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress --error-format=table > phpstan-report.txt -EXIT_CODE=$? - if [[ $GITHUB_ACTIONS = "" ]] then + ./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress --error-format=table > phpstan-report.txt + EXIT_CODE=$? echo 'The PHPstan report can be found in phpstan-report.txt' - exit $EXIT_CODE + +if [[ $GITHUB_ACTIONS = "true" ]] +then + ./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress --error-format=github > phpstan-report.txt + EXIT_CODE=$? + cat phpstan-report.txt fi -cat phpstan-report.txt - exit $EXIT_CODE