It seems that the --path-coverage option is not compatible with Pest's parallel testing feature. One possible solution is to use PHPUnit's parallel testing feature instead, which is compatible with the --path-coverage option.
To do this, you can install PHPUnit and configure it to use Pest's test files. Here's an example configuration file (phpunit.xml) that you can use:
<phpunit bootstrap="./vendor/pestphp/pest/bin/pest.php">
<testsuites>
<testsuite name="Pest Tests">
<directory>./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./app</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="./coverage" charset="UTF-8" yui="true" highlight="true" lowUpperBound="50" highLowerBound="80"/>
</logging>
<parallelize>
<testsuite name="Pest Tests"/>
</parallelize>
</phpunit>
This configuration file tells PHPUnit to use Pest's test files (./vendor/pestphp/pest/bin/pest.php as the bootstrap file), and to run the tests in parallel (<parallelize> tag). It also includes the --path-coverage option to generate line coverage reports (<logging> tag).
To run the tests, you can use the following command:
php ./vendor/phpunit/phpunit/phpunit --configuration ./phpunit.xml --processes 6
This command runs PHPUnit with the configuration file (--configuration option) and uses 6 processes (--processes option) for parallel testing.
Note that you may need to adjust the configuration file and command to fit your specific project structure and requirements.