-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoboFile.php
42 lines (39 loc) · 964 Bytes
/
RoboFile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
/**
* Runs tests suite of the project
*/
public function test()
{
$cmd = [];
$cmd[] = './vendor/bin/phpunit tests';
$cmd[] = '--coverage-html coverage/html';
$cmd[] = '--coverage-clover coverage/xml';
$cmd[] = '--whitelist ./src';
$this->_exec(implode(' ', $cmd));
}
/**
* Sends coverage result to Codacy
*/
public function coverageSend() {
$this->_exec('./vendor/bin/codacycoverage clover coverage/xml');
}
/**
* Opens coverage
*/
public function coverageOpen() {
$this->_exec('open coverage/html/index.html');
}
/**
* Performs static analysis
*/
public function analysis() {
$this->_exec('vendor/bin/phpstan analyse src tests --level=7');
}
}