forked from allegro/toper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
50 lines (41 loc) · 1.71 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
<?xml version="1.0"?>
<project name="Toper" basedir="." default="test">
<target name="test" description="Run tests">
<phingcall target="test.syntax"/>
<phingcall target="test.cs"/>
<phingcall target="test.unit"/>
<phingcall target="test.integration"/>
</target>
<target name="test.cs" description="Run codesniffer">
<exec
command="bin/phpcs --standard=PSR2 --ignore=${project.basedir}/vendor/,${project.basedir}/bin/ -p --report=full ${project.basedir}/"
passthru="true"
checkreturn="true"/>
</target>
<target name="test.unit" description="Run phpunit">
<exec
command="bin/phpunit --configuration phpunit.xml --strict --verbose --testsuite 'unit'"
passthru="true"
checkreturn="true"/>
</target>
<target name="test.integration" description="Integration tests">
<exec
command="bin/phpunit --configuration phpunit.xml --strict --verbose --testsuite 'integration'"
passthru="true"
checkreturn="true"/>
</target>
<target name="test.syntax" description="Run syntax check">
<phplint>
<fileset dir="${project.basedir}">
<include name="**/*.php"/>
<exclude name="vendor/**/*.php"/>
</fileset>
</phplint>
</target>
<target name="sonar.unit" description="Run phpunit">
<exec
command="bin/phpunit --configuration phpunit.xml --testsuite 'unit' --log-junit reports/phpunit.xml --coverage-clover reports/phpunit.coverage.xml"
passthru="true"
checkreturn="true"/>
</target>
</project>