diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3b4453..4cd6d56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,6 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} - coverage: xdebug extensions: dom - name: Validate composer.json and composer.lock @@ -38,15 +37,15 @@ jobs: run: composer install --prefer-dist --no-progress - name: Run the linter - run: composer lint + run: php ./vendor/bin/php-cs-fixer fix src --dry-run --allow-risky=yes - name: Run PHPStan if: success() || failure() - run: composer phpstan -- --error-format=github > phpstan.json + run: php -d memory_limit=1G ./vendor/bin/phpstan analyse -c phpstan.neon --error-format=github > phpstan.json - name: Run psalm if: success() || failure() - run: composer psalm --output-format=github + run: php ./vendor/bin/psalm --output-format=github integration-tests: name: Test suite and coverage @@ -64,7 +63,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} - coverage: xdebug + coverage: pcov extensions: dom - name: Install dependencies @@ -72,14 +71,10 @@ jobs: - name: Run test suite run: | - if [[ ${{ matrix.php-version }} == '8.2' ]]; then - composer coverage --min=100 --coverage-clover=coverage.xml - else - composer pest - fi + php ./vendor/bin/pest --coverage --min=100 --coverage-clover=coverage.xml --coverage-xml=logs/coverage --log-junit=logs/coverage.junit.xml - name: Run infection mutation testing - if: success() || failure() run: - composer infection --min-msi=90 --min-covered-msi=95 --threads=4 + php ./vendor/bin/infection --min-msi=90 --min-covered-msi=95 --threads=max --no-interaction --logger-github=true --skip-initial-tests --coverage=logs + diff --git a/composer.json b/composer.json index 7e48661..f403f95 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ } }, "require-dev": { - "pestphp/pest": "v1.23.1", + "pestphp/pest": "^v1.23.1", "friendsofphp/php-cs-fixer": "^3.16", "phpstan/phpstan": "^1.10", "phpstan/phpstan-deprecation-rules": "^1.1", diff --git a/composer.lock b/composer.lock index 7934a9b..17af95a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c1c65ace67e49f427c9962aa0e2d656", + "content-hash": "4a70ec854e14b945af2a15bc0cba3c3a", "packages": [ { "name": "monolog/monolog", diff --git a/phpstan.neon b/phpstan.neon index 816a6f1..8502cde 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -9,6 +9,9 @@ parameters: - message: '#Undefined variable: \$this#' path: */tests/* + - + message: '#Call to an undefined method Pest\\Expectation\|Pest\\Support\\Extendable\:\:#' + path: */tests/* includes: - vendor/phpstan/phpstan-deprecation-rules/rules.neon