diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index c1d3f18..c23d68b 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout code base - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -31,13 +31,7 @@ jobs: tools: phpcs - 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-pdfexport.git /usr/share/icingaweb2-modules/pdfexport - 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 + run: composer require -n --no-progress overtrue/phplint - name: PHP Lint if: ${{ ! cancelled() }} @@ -46,7 +40,3 @@ jobs: - name: PHP CodeSniffer if: ${{ ! cancelled() }} run: phpcs -wps --colors - - - 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..536a312 --- /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/pdfexport" : "https://github.com/Icinga/icingaweb2-module-pdfexport.git" + }