From fbc485f536d5ef3538b94a5c93fcaf1dc8f2b6c1 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Thu, 22 Feb 2024 10:11:36 -0800 Subject: [PATCH] Update php_stan.yml --- .github/workflows/php_stan.yml | 41 +++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/php_stan.yml b/.github/workflows/php_stan.yml index 012aa6d..9b24284 100644 --- a/.github/workflows/php_stan.yml +++ b/.github/workflows/php_stan.yml @@ -1,16 +1,35 @@ -name: Code Review with PHPStan +name: PHPStan + on: pull_request: - types: - - opened - - synchronize -permissions: write-all + branches: + - main + push: + branches: + - main + jobs: - code_review: + phpstan: + name: PHPStan runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v3 - - uses: php-actions/composer@v6 # or alternative dependency management - - uses: php-actions/phpstan@v3 - with: - path: src/ + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' # Change to your desired PHP version + + - name: Install Composer dependencies + run: composer install --no-progress --no-suggest --prefer-dist + + - name: Run PHPStan + run: composer phpstan + + - name: Upload PHPStan results + uses: actions/upload-artifact@v2 + with: + name: phpstan-results + path: phpstan-report.txt