Просмотр исходного кода

DX: Use ParaUnit to speed up tests (#6883)

Greg Korba 1 год назад
Родитель
Сommit
7d34e6925f
2 измененных файлов с 7 добавлено и 2 удалено
  1. 6 2
      .github/workflows/ci.yml
  2. 1 0
      composer.json

+ 6 - 2
.github/workflows/ci.yml

@@ -54,7 +54,6 @@ jobs:
             php-version: '8.2'
             job-description: 'with calculating code coverage'
             calculate-code-coverage: 'yes'
-            phpunit-flags: '--testsuite coverage --exclude-group covers-nothing --coverage-clover build/logs/clover.xml'
 
           - operating-system: 'ubuntu-20.04'
             php-version: '8.2'
@@ -143,10 +142,15 @@ jobs:
         run: sed 's/enforceTimeLimit="true"/enforceTimeLimit="false"/g' phpunit.xml.dist > phpunit.xml
 
       - name: Run tests
+        if: matrix.calculate-code-coverage != 'yes'
         env:
           PHP_CS_FIXER_IGNORE_ENV: ${{ matrix.PHP_CS_FIXER_IGNORE_ENV }}
           FAST_LINT_TEST_CASES: ${{ matrix.FAST_LINT_TEST_CASES }}
-        run: vendor/bin/phpunit ${{ matrix.phpunit-flags || '--exclude-group auto-review' }}
+        run: vendor/bin/paraunit run ${{ matrix.phpunit-flags || '--exclude-group auto-review' }}
+
+      - name: Collect code coverage
+        if: matrix.calculate-code-coverage == 'yes'
+        run: vendor/bin/paraunit coverage --testsuite coverage --exclude-group covers-nothing --clover build/logs/clover.xml
 
       - name: Upload coverage results to Coveralls
         if: matrix.calculate-code-coverage == 'yes'

+ 1 - 0
composer.json

@@ -40,6 +40,7 @@
         "symfony/stopwatch": "^5.4 || ^6.0"
     },
     "require-dev": {
+        "facile-it/paraunit": "^1.3 || ^2.0",
         "justinrainbow/json-schema": "^5.2",
         "keradus/cli-executor": "^2.0",
         "mikey179/vfsstream": "^1.6.11",