Attempt to test on travis ci
This commit is contained in:
parent
4a4e48e039
commit
2fa295ee6a
21
.travis.yml
Normal file
21
.travis.yml
Normal file
@ -0,0 +1,21 @@
|
||||
language: php
|
||||
|
||||
install:
|
||||
- composer install
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 7
|
||||
- hhvm
|
||||
- nightly
|
||||
|
||||
script:
|
||||
- mkdir -p build/logs
|
||||
- vendor/bin/phpunit -c build
|
||||
|
||||
services:
|
||||
- redis
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: nightly
|
21
RoboFile.php
21
RoboFile.php
@ -129,14 +129,11 @@ class RoboFile extends \Robo\Tasks {
|
||||
$files = $this->getAllSourceFiles();
|
||||
|
||||
$chunks = array_chunk($files, 6);
|
||||
$collection = $this->collection();
|
||||
|
||||
foreach($chunks as $chunk)
|
||||
{
|
||||
$this->parallelLint($collection, $chunk);
|
||||
$this->parallelLint($chunk);
|
||||
}
|
||||
|
||||
$collection->run();
|
||||
}
|
||||
|
||||
|
||||
@ -246,7 +243,11 @@ class RoboFile extends \Robo\Tasks {
|
||||
})
|
||||
->monitor('src', function () {
|
||||
$this->taskExec('test')->run();
|
||||
})->run();
|
||||
})
|
||||
->monitor('tests', function () {
|
||||
$this->taskExec('test')->run();
|
||||
})
|
||||
->run();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -289,16 +290,18 @@ class RoboFile extends \Robo\Tasks {
|
||||
* @param Collection $collection
|
||||
* @param array $chunk
|
||||
*/
|
||||
protected function parallelLint($collection, array $chunk)
|
||||
protected function parallelLint(array $chunk)
|
||||
{
|
||||
$task = $this->taskParallelExec();
|
||||
$task = $this->taskParallelExec()
|
||||
->timeout(5)
|
||||
->printed(FALSE);
|
||||
|
||||
foreach($chunk as $file)
|
||||
{
|
||||
$task = $task->process("php -l {$file}");
|
||||
}
|
||||
|
||||
$collection->add($task);
|
||||
$task->run();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -323,6 +326,6 @@ class RoboFile extends \Robo\Tasks {
|
||||
*/
|
||||
protected function _run(array $cmd_parts, $join_on = ' ')
|
||||
{
|
||||
$this->_exec(implode($join_on, $cmd_parts));
|
||||
$this->taskExec(implode($join_on, $cmd_parts))->run();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user