From e1368337be9d57212fc0878af16a3827e64b42eb Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Fri, 17 Nov 2023 12:28:14 +0100 Subject: [PATCH] workflows: Streamline vendor file location with local dev-env --- .github/workflows/php.yml | 12 ++++++------ phpstan.neon | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 2c1132e9..b08065cc 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -32,11 +32,11 @@ jobs: - name: Setup dependencies run: | - composer require -n --no-progress overtrue/phplint - git clone --depth 1 https://github.com/Icinga/icingaweb2.git vendor/icingaweb2 - git clone --depth 1 https://github.com/Icinga/icingaweb2-module-director.git vendor/director - git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git vendor/icinga-php-library - git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git vendor/icinga-php-thirdparty + composer require -n --no-progress overtrue/phplint phpstan/phpstan + sudo git clone --depth 1 https://github.com/Icinga/icingaweb2.git /icingaweb2 + sudo git clone --depth 1 https://github.com/Icinga/icingaweb2-module-director.git /usr/share/icingaweb2-modules/director + sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git /usr/share/icinga-php/ipl + sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git /usr/share/icinga-php/vendor - name: PHP Lint if: ${{ ! cancelled() }} @@ -48,7 +48,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 209738fa..efeb32e3 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -14,7 +14,10 @@ parameters: - library scanDirectories: - - vendor + - /icingaweb2 + - /usr/share/icingaweb2-modules/director + - /usr/share/icinga-php/ipl + - /usr/share/icinga-php/vendor ignoreErrors: -