Skip to content

Commit

Permalink
Update robo task
Browse files Browse the repository at this point in the history
  • Loading branch information
holyshared committed Jan 1, 2015
1 parent 206d94e commit 5ad45bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
19 changes: 12 additions & 7 deletions RoboFile.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?php

use \Robo\Tasks;
use coverallskit\Configuration;
use coverallskit\ReportBuilder;

use \coverallskit\robo\CoverallsKitTasks;

/**
* Class RoboFile
*/
class RoboFile extends Tasks
{

use CoverallsKitTasks;

public function specAll()
{
return $this->taskExec('vendor/bin/peridot spec')->run();
Expand All @@ -18,11 +21,13 @@ public function phpMetrics()
return $this->taskExec('vendor/bin/phpmetrics src')->run();
}

public function specCoveralls()
public function coverallsUpload()
{
$configuration = Configuration::loadFromFile('coveralls.toml');
$builder = ReportBuilder::fromConfiguration($configuration);
$builder->build()->save()->upload();
$result = $this->taskCoverallsKit()
->configure('coveralls.toml')
->run();

return $result;
}

}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"beberlei/assert": "~2.3",
"phpspec/prophecy": "~1.3",
"cloak/cloak": "~1.4",
"cloak/coverallskit": "~1.4",
"cloak/robo-coveralls-kit": "~1.0",
"halleck45/php-metrics": "~1.1",
"codegyre/robo": "~0.4"
},
Expand Down Expand Up @@ -46,7 +46,7 @@
},
"scripts": {
"test": "vendor/bin/robo spec:all",
"coveralls": "vendor/bin/robo spec:coveralls",
"coveralls": "vendor/bin/robo coveralls:upload",
"metrics": "vendor/bin/robo php:metrics"
},
"minimum-stability": "stable"
Expand Down

0 comments on commit 5ad45bc

Please sign in to comment.