From c66cefe521ffc005312748332d0e57a681245517 Mon Sep 17 00:00:00 2001 From: Randall Wilk Date: Fri, 29 Sep 2023 10:11:52 -0500 Subject: [PATCH] Add larastan workflow --- .github/workflows/larastan.yml | 26 ++++++++++++++++++++++++++ composer.json | 1 + 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/larastan.yml diff --git a/.github/workflows/larastan.yml b/.github/workflows/larastan.yml new file mode 100644 index 0000000..f860a80 --- /dev/null +++ b/.github/workflows/larastan.yml @@ -0,0 +1,26 @@ +name: Larastan + +on: + push: + paths: + - '**.php' + - 'phpstan.neon.dist' + +jobs: + larastan: + name: larastan + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + coverage: none + + - name: Install dependencies + uses: ramsey/composer-install@v2 + + - name: Run Larastan + run: ./vendor/bin/phpstan --error-format=github diff --git a/composer.json b/composer.json index 4f220d6..be4c176 100644 --- a/composer.json +++ b/composer.json @@ -49,6 +49,7 @@ "post-autoload-dump": [ "@php ./vendor/bin/testbench package:discover --ansi" ], + "analyse": "vendor/bin/phpstan analyse", "test": "vendor/bin/pest -p", "format": "vendor/bin/pint --dirty" },