mirror of
https://github.com/danog/parallel-functions.git
synced 2024-11-30 04:39:03 +01:00
Fix intentional example error and improve Travis build
Examples are now executed in a subshell, so a failure doesn't terminate the complete build.
This commit is contained in:
parent
2834e2957b
commit
74c8b5f145
@ -27,7 +27,7 @@ install:
|
|||||||
script:
|
script:
|
||||||
# Run with phpdbg or xdebug as soon as one of both doesn't segfault anymore
|
# Run with phpdbg or xdebug as soon as one of both doesn't segfault anymore
|
||||||
- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
|
- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
|
||||||
- for f in examples/*.php; do echo $f && if ! php $f; then echo '!! failed !!' && exit 1; fi && echo "-------"; done
|
- (for f in examples/*.php; do echo $f && if ! php $f; then echo '!! failed !!' && exit 1; fi && echo "-------"; done)
|
||||||
- PHP_CS_FIXER_IGNORE_ENV=1 php vendor/bin/php-cs-fixer --diff --dry-run -v fix
|
- PHP_CS_FIXER_IGNORE_ENV=1 php vendor/bin/php-cs-fixer --diff --dry-run -v fix
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
|
@ -4,7 +4,7 @@ require __DIR__ . '/../vendor/autoload.php';
|
|||||||
|
|
||||||
use function Amp\ParallelFunctions\parallelMap;
|
use function Amp\ParallelFunctions\parallelMap;
|
||||||
use function Amp\Promise\wait;
|
use function Amp\Promise\wait;
|
||||||
f
|
|
||||||
// All output in the parallel environment is redirected to STDERR of the parent process automatically.
|
// All output in the parallel environment is redirected to STDERR of the parent process automatically.
|
||||||
// You might notice that the output order varies here when running it multiple times.
|
// You might notice that the output order varies here when running it multiple times.
|
||||||
wait(parallelMap([1, 2, 3], 'var_dump'));
|
wait(parallelMap([1, 2, 3], 'var_dump'));
|
Loading…
Reference in New Issue
Block a user