From 8cd29c566f492342ab3afe62a9b6bc5da4cdde8f Mon Sep 17 00:00:00 2001 From: raviks789 Date: Thu, 11 Apr 2024 15:58:41 +0200 Subject: [PATCH] PHP Workflow: Separate PHPStan tests --- .github/workflows/php.yml | 11 +---------- .github/workflows/phpstan.yml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/phpstan.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index a3a870e..cb0f515 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -32,12 +32,7 @@ jobs: - name: Setup dependencies run: | - 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/icingadb-web.git /usr/share/icingaweb2-modules/icingadb - 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 + composer require -n --no-progress overtrue/phplint - name: PHP Lint if: ${{ ! cancelled() }} @@ -46,7 +41,3 @@ jobs: - name: PHP CodeSniffer if: ${{ ! cancelled() }} run: phpcs - - - name: PHPStan - if: ${{ ! cancelled() }} - run: ./vendor/bin/phpstan analyse diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..2ad0db8 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,17 @@ +name: PHPStan + +on: + pull_request: + branches: + - main + +jobs: + phpstan: + uses: icinga/github-actions/.github/workflows/phpstan.yml@main + with: + dependencies: | + { + "/icingaweb2" : "https://github.com/Icinga/icingaweb2.git", + "/usr/share/icingaweb2-modules/icingadb" : "https://github.com/Icinga/icingadb-web.git", + "/usr/share/icingaweb2-modules/director" : "https://github.com/Icinga/icingaweb2-module-director.git" + }