-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.xml
59 lines (49 loc) · 1.87 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="magento" default="build">
<target name="build" depends="build-parallel"/>
<target name="build-parallel" depends="prepare,tools-parallel"/>
<target name="tools-parallel" description="Run tools in parallel">
<parallel threadCount="4">
<antcall target="lint"/>
<antcall target="phpunit-unittests"/>
<antcall target="phploc"/>
</parallel>
</target>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build/api"/>
<delete dir="${basedir}/build/clover"/>
<delete dir="${basedir}/build/coverage"/>
<delete dir="${basedir}/build/logs"/>
</target>
<target name="prepare" depends="clean"
description="Prepare for build">
<mkdir dir="${basedir}/build/api"/>
<mkdir dir="${basedir}/build/clover"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/logs"/>
</target>
<target name="lint">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}">
<include name="**/*.php" />
<modified />
</fileset>
</apply>
</target>
<target name="phploc" description="Measure project size using PHPLOC">
<exec executable="phploc">
<arg value="--count-tests" />
<arg value="--log-csv" />
<arg value="${basedir}/build/logs/phploc.csv" />
<arg path="${basedir}" />
</exec>
</target>
<target name="phpunit-unittests" description="Run unit tests with PHPUnit">
<!-- run the unit tests -->
<exec executable="phpunit">
<arg value="--configuration" />
<arg file="${basedir}/tests/phpunit.xml" />
</exec>
</target>
</project>