diff --git a/.github/workflows/larastan.yml b/.github/workflows/larastan.yml index 31386bd..dbd00ac 100644 --- a/.github/workflows/larastan.yml +++ b/.github/workflows/larastan.yml @@ -30,9 +30,6 @@ jobs: key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: ${{ runner.os }}-composer- - name: Install composer dependencies - env: - COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} - run: | - composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - - name: Larastan - run: ./vendor/bin/phpstan analyse + run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + - name: Stan + run: composer stan diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml index 590e1f5..86322cd 100644 --- a/.github/workflows/pint.yml +++ b/.github/workflows/pint.yml @@ -11,13 +11,5 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 2 - - name: "laravel-pint" - uses: aglipanci/laravel-pint-action@0.1.0 - with: - preset: laravel - - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: PHP Linting (Pint) - skip_fetch: true + - name: "Lint" + run: composer lint -- --test diff --git a/composer.json b/composer.json index 4e417c3..c5ddf20 100644 --- a/composer.json +++ b/composer.json @@ -56,6 +56,12 @@ "build": [ "@php whisky app:build whisky" ], + "lint": [ + "vendor/bin/pint" + ], + "stan": [ + "vendor/bin/phpstan analyse" + ], "test": [ "@php whisky test" ] diff --git a/whisky.json b/whisky.json index 12c760e..5fb6297 100644 --- a/whisky.json +++ b/whisky.json @@ -2,10 +2,11 @@ "disabled": [], "hooks": { "pre-commit": [ - "composer lint", - "composer pint --dirty" + "composer lint -- --test" ], "pre-push": [ + "composer lint -- --test", + "composer stan", "composer test" ] }