This repository has been archived by the owner on Feb 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
62 lines (57 loc) · 2.74 KB
/
build.xml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0" encoding="UTF-8"?>
<project name="app" basedir=".">
<condition property="ext" value=".bat">
<os family="windows"/>
</condition>
<target name="phpunit" description="Run PHPUnit">
<exec executable="${basedir}/vendor/bin/phpunit${ext}" searchpath="true" resolveexecutable="true" failonerror="true" taskname="phpunit">
<arg value="--configuration"/>
<arg path="${basedir}/phpunit.xml"/>
</exec>
</target>
<target name="phpunit-coverage" description="Run PHPUnit with coverage">
<delete dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/coverage"/>
<exec executable="${basedir}/vendor/bin/phpunit${ext}" searchpath="true" resolveexecutable="true" failonerror="true" taskname="phpunit-coverage">
<arg value="--configuration"/>
<arg path="${basedir}/phpunit.xml"/>
<arg value="--coverage-clover"/>
<arg path="${basedir}/build/logs/clover.xml"/>
<arg value="--coverage-html"/>
<arg path="${basedir}/build/coverage"/>
</exec>
</target>
<target name="fix-style" description="Code style fixer">
<mkdir dir="${basedir}/build"/>
<get src="https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.10.2/php-cs-fixer.phar" dest="${basedir}/build/php-cs-fixer.phar" skipexisting="true"/>
<exec executable="php" searchpath="true" resolveexecutable="true">
<arg value="${basedir}/build/php-cs-fixer.phar"/>
<arg value="fix"/>
<arg value="--rules=@PSR2"/>
<arg value="--using-cache=no"/>
<arg path="${basedir}/src"/>
</exec>
<exec executable="php" searchpath="true" resolveexecutable="true">
<arg value="${basedir}/build/php-cs-fixer.phar"/>
<arg value="fix"/>
<arg value="--rules=@PSR2"/>
<arg value="--using-cache=no"/>
<arg path="${basedir}/tests"/>
</exec>
</target>
<target name="phpstan" description="PHP Static Analysis Tool - discover bugs in your code without running it">
<mkdir dir="${basedir}/build"/>
<get src="https://github.com/phpstan/phpstan/releases/download/0.9.2/phpstan.phar"
dest="${basedir}/build/phpstan.phar" skipexisting="true"/>
<exec executable="php" searchpath="true" resolveexecutable="true" failonerror="true">
<arg value="${basedir}/build/phpstan.phar"/>
<arg value="analyse"/>
<arg value="-l"/>
<arg value="5"/>
<arg value="src"/>
<arg value="tests"/>
<arg value="--no-interaction"/>
<arg value="--no-progress"/>
</exec>
</target>
</project>