From 6343bcea997c6d2d549de37e5f2734ace080a7d2 Mon Sep 17 00:00:00 2001 From: Zaher Ghaibeh Date: Wed, 3 May 2023 22:14:48 +0300 Subject: [PATCH] Adding phstan GitHub workflow --- .github/workflows/php-stan.yml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/php-stan.yml diff --git a/.github/workflows/php-stan.yml b/.github/workflows/php-stan.yml new file mode 100644 index 0000000..cd352b7 --- /dev/null +++ b/.github/workflows/php-stan.yml @@ -0,0 +1,40 @@ +name: Larastan + +on: + push: + pull_request: + branches: + - main + +concurrency: + group: larastan-${{ github.ref_name || github.run_id }} + cancel-in-progress: true + +jobs: + + larastan: + name: Larastan PHP ${{ matrix.php }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['8.2'] + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Install Composer dependencies + uses: ramsey/composer-install@v2 + with: + composer-options: "--no-progress --prefer-dist --optimize-autoloader" + + - name: Larastan + run: php ./vendor/bin/phpstan analyse --memory-limit=2G --error-format=github