Created
June 15, 2020 21:07
-
-
Save bendavies/4864ce2e1e50657eb07b432024466eeb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
mkdir -p build/logs/phpunit build/coverage | |
split_tests=$(find tests -name '*Test.php') | |
export PARALLEL='-j10% --joblog build/logs/parallel.log --rpl {_}\ s/\\//_/g;' | |
phpunit_cmd='TEST_TOKEN={%} vendor/bin/phpunit --coverage-php build/coverage/coverage-{_}.cov --log-junit build/logs/phpunit/{_}.xml --colors=always {}' | |
echo "$split_tests" | parallel "$phpunit_cmd" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment