From bacdda8027d0b4c2937185882d06b1876818b247 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 15 Apr 2024 14:39:37 +0200 Subject: [PATCH] Phpstan: Use separate workflow --- .github/workflows/php.yml | 12 +++--------- .github/workflows/phpstan.yml | 10 ++++++++++ phpstan.neon | 3 --- 3 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/phpstan.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index cfcf0af..abbee18 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,9 +31,7 @@ jobs: tools: phpcs - name: Setup dependencies - run: | - composer require -n --no-progress overtrue/phplint phpstan/phpstan - sudo cp -R vendor /usr/share/icinga-php + run: composer require -n --no-progress overtrue/phplint - name: PHP Lint if: ${{ ! cancelled() }} @@ -43,10 +41,6 @@ jobs: if: ${{ ! cancelled() }} run: phpcs -wps --colors - - name: PHPStan - if: ${{ ! cancelled() }} - run: ./vendor/bin/phpstan analyse - test: name: Unit tests with php ${{ matrix.php }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -62,7 +56,7 @@ jobs: steps: - name: Checkout code base - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..a4430d9 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,10 @@ +name: PHPStan + +on: + pull_request: + branches: + - main + +jobs: + phpstan: + uses: icinga/github-actions/.github/workflows/phpstan.yml@main diff --git a/phpstan.neon b/phpstan.neon index 303e5ef..5c03267 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,9 +8,6 @@ parameters: paths: - src - scanDirectories: - - /usr/share/icinga-php - ignoreErrors: - messages: