forked from pear/Services_Openstreetmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
63 lines (53 loc) · 2.02 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
63
<?xml version="1.0"?>
<!-- build xml -->
<project name="services_openstreetmap" default="main">
<fileset dir="tests" id="tests" includes="**/*.php"/>
<fileset dir="Services" id="Services" includes="**/*.php"/>
<target name="main" depends="test,phpcs,docs"/>
<target name="docs" description="Generate Documentation" depends="clean_docs">
<phpdoc title="Services_Openstreetmap" output="HTML:Smarty:PHP" destdir="docs" sourcecode="yes">
<fileset refid="Services"/>
</phpdoc>
</target>
<target name="phpcs" description="coding standards">
<phpcodesniffer standard="PEAR" haltonerror="yes">
<fileset refid="Services"/>
</phpcodesniffer>
</target>
<target name="lint" description="Check syntax">
<phplint>
<fileset refid="Services"/>
<fileset refid="tests"/>
</phplint>
</target>
<target name="test" description="run unit tests" depends="lint,clean_phpunit">
<coverage-setup database="./coverage.db">
<fileset dir="tests" includes="**/*.php"/>
<fileset dir="Services" includes="**/*.php"/>
</coverage-setup>
<phpunit printsummary="yes" codecoverage="yes">
<formatter type="plain" usefile="no"/>
<batchtest>
<fileset refid="tests"/>
</batchtest>
</phpunit>
<coverage-report outfile="coverage.xml">
<report todir="tests/coverage" usesorttable="yes" styledir="/usr/share/php/data/phing/etc"/>
</coverage-report>
</target>
<target name="clean" depends="clean_phpunit,clean_docs"/>
<target name="clean_phpunit">
<delete verbose='yes'>
<fileset dir="tests/coverage">
<include name="**.*" />
</fileset>
</delete>
</target>
<target name="clean_docs">
<delete verbose='yes'>
<fileset dir="docs">
<include name="**.*" />
</fileset>
</delete>
</target>
</project>