Skip to content

switching on phpstan v2 level 10 #2

switching on phpstan v2 level 10

switching on phpstan v2 level 10 #2

name: 'PHPStan'
on:
# Every Wednesday we want to refresh the baseline
schedule:
- cron: '0 6 * * 3'
# We want to be able to manually refresh the baseline too
workflow_dispatch:
# Run PHPStan analyse on pull requests
pull_request:
env:
PHP_VERSION: '8.2'
jobs:
phpstan:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
env:
fail-fast: true
- uses: ramsey/composer-install@v2
- uses: ruudk/phpstan-baseline-refresh-create-pr-action@main
with:
github_token: ${{ secrets.PAT_GITHUB_TOKEN }}
baseline_path: build/phpstan/phpstan-baseline.neon
commit_name: Dolibot
commit_email: dolibarr-bot@users.noreply.github.com
commit_message: PHPStan > Update baseline
pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }}
pr_title: PHPStan > Update baseline
pr_reviewer: eldy
pr_body: |
This PR is automatically created to cleanup our baseline.
Since the last refresh of the baseline we have fixed {0} ignored errors.
Keep it up all! :muscle:
There are only {1} ignored errors left :sweat_smile: