From b77b3e3fc883c30ee16e3baf2727b237dc0a86f1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 4 Nov 2023 11:41:21 +0100 Subject: [PATCH] Fix script and job --- .ci/phpstan.sh | 3 ++- .github/workflows/sonarcloud.yml | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.ci/phpstan.sh b/.ci/phpstan.sh index 1b1a74af2a..9a54435bb8 100755 --- a/.ci/phpstan.sh +++ b/.ci/phpstan.sh @@ -33,7 +33,8 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) ./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress --error-format=table > phpstan-report.txt EXIT_CODE=$? -if [ $GITHUB_ACTIONS -ne "true" ]; then +if [[ $GITHUB_ACTIONS = "" ]] +then echo 'The PHPstan report can be found in phpstan-report.txt' exit $EXIT_CODE fi diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 780fb02ad8..3d7dbee255 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -49,9 +49,7 @@ jobs: run: composer install --prefer-dist --no-interaction --no-progress --no-scripts - name: PHPStan - uses: php-actions/phpstan@v3 - with: - configuration: .ci/phpstan.neon + run: .ci/phpstan.sh - name: "Create database file" run: touch storage/database/database.sqlite