diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04e322d..5e59a10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,28 @@ jobs: - name: Run PHPUnit run: composer test + phpstan: + name: PHPStan + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6.0.2 + + - uses: shivammathur/setup-php@2.37.0 + with: + php-version: '8.3' + coverage: none + tools: composer:v2 + + - name: Install dependencies + run: composer update --prefer-dist --no-interaction --no-progress + + - name: Install PHPStan + run: composer require --dev phpstan/phpstan:^1.10 --no-interaction --no-progress + + - name: Run PHPStan + run: vendor/bin/phpstan analyse --configuration=phpstan.neon + lowest-dependencies: name: Lowest dependencies runs-on: ubuntu-latest diff --git a/composer.json b/composer.json index b51ea2e..c33036c 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,6 @@ "voku/portable-utf8": "^6.0" }, "require-dev": { - "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" }, "autoload": { @@ -28,5 +27,8 @@ "psr-4": { "voku\\Html2Text\\tests\\": "tests" } + }, + "scripts": { + "test": "vendor/bin/phpunit" } }