From 242d26a709ee9e541cc0bef2b52b10d9399d5a86 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 25 Jan 2024 03:08:21 +0100 Subject: [PATCH] phpstan: Streamline vendor file location with local dev-env phpstan is not run with an action anymore, as the action runs it its own docker container and hence has no access to files outside the repository root. A side-effect of this is, that phpstan now **really** runs with the php version set up by the matrix. --- .github/workflows/php.yml | 6 +++--- phpstan.neon | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 0c63fe7c..49a91b01 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -32,8 +32,8 @@ jobs: - name: Setup dependencies run: | - composer require -n --no-progress overtrue/phplint - git clone --depth 1 https://github.com/Icinga/icingaweb2.git vendor/icingaweb2 + composer require -n --no-progress overtrue/phplint phpstan/phpstan + && sudo git clone --depth 1 https://github.com/Icinga/icingaweb2.git /icingaweb2 - name: PHP Lint if: ${{ ! cancelled() }} @@ -45,7 +45,7 @@ jobs: - name: PHPStan if: ${{ ! cancelled() }} - uses: php-actions/phpstan@v3 + run: ./vendor/bin/phpstan analyse test: name: Unit tests with php ${{ matrix.php }} on ${{ matrix.os }} diff --git a/phpstan.neon b/phpstan.neon index 1162bb6c..70dccf37 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,7 +12,7 @@ parameters: - src scanDirectories: - - vendor + - /icingaweb2 ignoreErrors: -