Skip to content

Commit

Permalink
Phpstan: Use separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 authored and nilmerg committed Apr 15, 2024
1 parent e0c4005 commit bacdda8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() }}
Expand All @@ -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 }}
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: PHPStan

on:
pull_request:
branches:
- main

jobs:
phpstan:
uses: icinga/github-actions/.github/workflows/phpstan.yml@main
3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ parameters:
paths:
- src

scanDirectories:
- /usr/share/icinga-php

ignoreErrors:
-
messages:
Expand Down

0 comments on commit bacdda8

Please sign in to comment.