diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68e7d7ba021..c63243e663e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,6 +121,10 @@ jobs: if: matrix.execute-migration-rules == 'yes' run: php php-cs-fixer fix --rules @PHP73Migration,@PHP71Migration:risky,blank_line_after_opening_tag -q + - name: Disable time limit for tests when collecting coverage + if: matrix.calculate-code-coverage == 'yes' + run: sed 's/enforceTimeLimit="true"/enforceTimeLimit="false"/g' phpunit.xml.dist > phpunit.xml + - name: Run tests continue-on-error: ${{ matrix.php-version == '8.0' }} env: diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 04b307072a7..34855e4dfc6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -15,11 +15,14 @@ convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" + defaultTimeLimit="3" enforceTimeLimit="true" failOnWarning="true" processIsolation="false" stopOnFailure="false" - timeoutForSmallTests="2" + timeoutForSmallTests="3" + timeoutForMediumTests="6" + timeoutForLargeTests="9" verbose="false" > diff --git a/tests/Linter/AbstractLinterTestCase.php b/tests/Linter/AbstractLinterTestCase.php index 889bb3490f1..f3dfee341d2 100644 --- a/tests/Linter/AbstractLinterTestCase.php +++ b/tests/Linter/AbstractLinterTestCase.php @@ -57,6 +57,8 @@ public function testLintFile($file, $errorMessage = null) /** * @return array + * + * @medium */ public function provideLintFileCases() { diff --git a/tests/Smoke/AbstractSmokeTest.php b/tests/Smoke/AbstractSmokeTest.php index 79e82164dfa..30c2c27bc5c 100644 --- a/tests/Smoke/AbstractSmokeTest.php +++ b/tests/Smoke/AbstractSmokeTest.php @@ -22,7 +22,6 @@ * @requires OS Linux|Darwin * @coversNothing * @group covers-nothing - * @large */ abstract class AbstractSmokeTest extends TestCase { diff --git a/tests/Smoke/StdinTest.php b/tests/Smoke/StdinTest.php index 684656a13ae..e3e971ab971 100644 --- a/tests/Smoke/StdinTest.php +++ b/tests/Smoke/StdinTest.php @@ -23,6 +23,7 @@ * @requires OS Linux|Darwin * @coversNothing * @group covers-nothing + * @large */ final class StdinTest extends AbstractSmokeTest { diff --git a/tests/Test/AbstractIntegrationTestCase.php b/tests/Test/AbstractIntegrationTestCase.php index 191eb4e0c01..5c8e828f838 100644 --- a/tests/Test/AbstractIntegrationTestCase.php +++ b/tests/Test/AbstractIntegrationTestCase.php @@ -129,6 +129,7 @@ protected function doTearDown() * @dataProvider provideIntegrationCases * * @see doTest() + * @large */ public function testIntegration(IntegrationCase $case) {