1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
psalm/phpunit.xml.dist
Bruce Weirdan dabfb16e34
Test parallelization (#4045)
* Run tests in random order

Being able to run tests in any order is a pre-requisite for being able
to run them in parallel.

* Reset type coverage between tests, fix affected tests

* Reset parser and lexer between test runs and on php version change

Previously lexer was reset, but parser kept the reference to the old
one, and reference to the parser was kept by StatementsProvider. This
resulted in order-dependent tests - if the parser was first initialized
with phpVersion set to 7.4 then arrow functions worked fine, but were
failing when the parser was initially constructed with settings for 7.3

This can be demonstrated on current master by upgrading to
nikic/php-parser:4.9 and running:

```
vendor/bin/phpunit --no-coverage --filter="inferredArgArrowFunction" tests/ClosureTest.php
```

Now all tests using PHP 7.4 features must set the PHP version
accordingly.

* Marked more tests using 7.4 syntax

* Reset newline-between-annotation flag between tests

* Resolve real paths before passing them to checkPaths

When checkPaths is called from psalm.php the paths are resolved, so we
just mimicking SUT behaviour here.

* Restore newline-between-annotations in DocCommentTest

* Tweak Appveyor caches

* Tweak TravisCI caches

* Tweak CircleCI caches

* Run tests in parallel

Use `vendor/bin/paratest` instead of `vendor/bin/phpunit`

* Use default paratest runner on Windows

WrapperRunner is not supported on Windows.

* TRAVIS_TAG could be empty

* Restore appveyor conditional caching
2021-01-29 11:38:04 +01:00

54 lines
2.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
backupGlobals="false"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestsThatDoNotTestAnything="false"
beStrictAboutTodoAnnotatedTests="true"
colors="true"
verbose="true"
executionOrder="random"
>
<testsuites>
<testsuite name="psalm">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
<exclude>
<directory suffix=".php">src/Psalm/Issue/</directory>
<directory suffix=".php">src/Psalm/Internal/Stubs/</directory>
<directory suffix=".php">src/Psalm/Internal/LanguageServer/</directory>
<directory suffix=".php">src/Psalm/Internal/ExecutionEnvironment/</directory>
<directory suffix=".php">src/Psalm/SourceControl/</directory>
<file>src/command_functions.php</file>
<file>src/psalm.php</file>
<file>src/psalm-language-server.php</file>
<file>src/psalter.php</file>
<file>src/psalm_plugin.php</file>
<file>src/psalm-refactor.php</file>
<file>src/Psalm/Plugin/Shepherd.php</file>
<file>src/Psalm/Internal/CallMap.php</file>
<file>src/Psalm/Internal/Fork/Pool.php</file>
<file>src/Psalm/Internal/Fork/Restarter.php</file>
<file>src/Psalm/Internal/PropertyMap.php</file>
<file>src/Psalm/Internal/Provider/ClassLikeStorageCacheProvider.php</file>
<file>src/Psalm/Internal/Provider/FileReferenceCacheProvider.php</file>
<file>src/Psalm/Internal/Provider/FileStorageCacheProvider.php</file>
<file>src/Psalm/Internal/Provider/ParserCacheProvider.php</file>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="coverage-html" target="build/logs/phpunit-html/"/>
</logging>
</phpunit>