File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,6 @@ jobs:
124
124
- image : circleci/php:7.2-node-browsers
125
125
environment :
126
126
SYMFONY_DEPRECATIONS_HELPER : weak_vendors
127
- APP_ENV : test
128
127
parallelism : 2
129
128
working_directory : ~/api-platform/core
130
129
steps :
@@ -141,8 +140,11 @@ jobs:
141
140
- run :
142
141
name : Run PHPUnit tests
143
142
command : |-
144
- mkdir -p build/logs/tmp build/cov
145
- phpdbg -qrr vendor/bin/phpunit --coverage-php build/cov/coverage.cov --log-junit build/logs/tmp/coverage.xml --colors=always
143
+ mkdir -p build/logs/parallel build/logs/tmp build/cov
144
+ split_tests=$(find tests -name '*Test.php' -not -path 'tests/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtensionTest.php' | circleci tests split --split-by=timings)
145
+ export PARALLEL='-j10% --joblog build/logs/parallel/jobs.log --rpl {_}\ s/\\//_/g;'
146
+ phpunit_cmd='phpdbg -qrr vendor/bin/phpunit --coverage-php build/cov/coverage-{_}.cov --log-junit build/logs/tmp/{_}.xml --colors=always {}'
147
+ echo "$split_tests" | parallel "$phpunit_cmd" || echo "$split_tests" | parallel --retry-failed "$phpunit_cmd"
146
148
- run :
147
149
name : Merge PHPUnit test reports
148
150
command : |-
@@ -154,6 +156,9 @@ jobs:
154
156
- store_artifacts :
155
157
path : build/logs/phpunit/junit.xml
156
158
destination : build/logs/phpunit/junit.xml
159
+ - store_artifacts :
160
+ path : build/logs/parallel/jobs.log
161
+ destination : build/logs/parallel/jobs.log
157
162
- persist_to_workspace :
158
163
root : build
159
164
paths :
You can’t perform that action at this time.
0 commit comments