Skip to content

Commit

Permalink
[ci] split rules tests to code quality, type declaration and dead-cod…
Browse files Browse the repository at this point in the history
…e to speed up (#3920)
  • Loading branch information
TomasVotruba committed May 22, 2023
1 parent a813b17 commit 44735d3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- "tests"
- "--testsuite php-rules"
- "--testsuite other-rules"
- "--testsuite code-quality-rules"
- "--testsuite dead-code-rules"
- "--testsuite type-declaration-rules"
- "packages-tests"
- "utils-tests"

Expand Down
58 changes: 35 additions & 23 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,43 @@
bootstrap="tests/bootstrap.php"
colors="true"
executionOrder="defects"
cacheDirectory=".phpunit.cache"
defaultTestSuite="main"
>
<testsuites>
<testsuite name="main">
<directory>tests</directory>
<directory>rules-tests</directory>
<directory>packages-tests</directory>
<directory>utils-tests</directory>
</testsuite>

<testsuites>
<testsuite name="main">
<directory>tests</directory>
<directory>rules-tests</directory>
<directory>packages-tests</directory>
<directory>utils-tests</directory>
</testsuite>
<!-- divide the rules-tests roughly in 2 equal sized groups -->
<testsuite name="php-rules">
<directory>rules-tests/Php*</directory>
</testsuite>
<testsuite name="other-rules">
<directory>rules-tests/</directory>
<exclude>rules-tests/Php*</exclude>
</testsuite>
</testsuites>
<php>
<ini name="memory_limit" value="-1"/>
</php>
<!-- divide the rules-tests roughly in 3 equal sized groups -->
<testsuite name="php-rules">
<directory>rules-tests/Php*</directory>
</testsuite>
<testsuite name="type-declaration-rules">
<directory>rules-tests/TypeDeclaration</directory>
</testsuite>
<testsuite name="code-quality-rules">
<directory>rules-tests/CodeQuality</directory>
</testsuite>
<testsuite name="dead-code-rules">
<directory>rules-tests/DeadCode</directory>
</testsuite>
<testsuite name="other-rules">
<directory>rules-tests/</directory>
<exclude>rules-tests/Php*</exclude>
<exclude>rules-tests/TypeDeclaration</exclude>
<exclude>rules-tests/CodeQuality</exclude>
<exclude>rules-tests/DeadCode</exclude>
</testsuite>
</testsuites>

<extensions>
<bootstrap class="Ergebnis\PHPUnit\SlowTestDetector\Extension"/>
</extensions>
<php>
<ini name="memory_limit" value="-1"/>
</php>

<extensions>
<bootstrap class="Ergebnis\PHPUnit\SlowTestDetector\Extension"/>
</extensions>
</phpunit>

0 comments on commit 44735d3

Please sign in to comment.