forked from ne-sachirou/c4se-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
53 lines (49 loc) · 1.77 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="c4se-web" default="main">
<target name="main">
<!--<phingcall target="build"/>-->
<phingcall target="test"/>
</target>
<!--<target name="build" depends=""/>-->
<fileset dir="." id="views">
<include name="lib/views/**/**.html"/>
</fileset>
<target name="test">
<!-- PHP lint -->
<apply executable="php" checkreturn="true">
<arg value="-l"/>
<fileset dir=".">
<include name="index.php"/>
<include name="src/**/*.php"/>
<include name="tests/**/*.php"/>
</fileset>
</apply>
<!-- PHP-CS-Fixer -->
<foreach list="index.php, src/, tests/" param="dir" target="test-cs-fixer"/>
<!-- PHP Mess Detector -->
<exec executable="vendor/bin/phpmd" passthru="true" checkreturn="true">
<arg value="src/"/>
<arg value="text"/>
<arg value="phpmd.xml"/>
</exec>
<!-- PHP_CodeSniffer -->
<exec executable="vendor/bin/phpcbf" passthru="true">
<arg value="--standard=phpcs.xml"/>
<arg value="--extensions=php"/>
<arg value="src/"/>
</exec>
<exec executable="vendor/bin/phpcs" passthru="true" checkreturn="true">
<arg value="--standard=phpcs.xml"/>
<arg value="--extensions=php"/>
<arg value="src/"/>
</exec>
<!-- PHPUnit -->
<exec command="vendor/bin/phpunit" passthru="true" checkreturn="true"/>
</target>
<target name="test-cs-fixer">
<exec executable="vendor/bin/php-cs-fixer" passthru="true">
<arg value="fix"/>
<arg value="${dir}"/>
</exec>
</target>
</project>