-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
58 lines (49 loc) · 2.13 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
<project name="Ulabox Coding Standard" default="test">
<property file="build.properties" />
<available property="composer.exists" file="${composer.path}" />
<target name="test" depends="vendor,lint,phpunit,phpcs" />
<target name="travis" depends="lint,phpunit-travis" />
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/coverage" />
<mkdir dir="${basedir}/build/logs" />
</target>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build" />
</target>
<target name="vendor" description="Load composer repositories" depends="composer">
<exec executable="composer" failonerror="true">
<arg value="install" />
</exec>
</target>
<target name="composer" description="Download composer" unless="composer.exists">
<get src="${composer.url}" dest="${composer.path}" />
</target>
<target name="lint" description="Perform syntax check">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}">
<include name="**/*.php" />
<exclude name="vendor/" />
</fileset>
</apply>
</target>
<target name="phpunit-travis" description="Run unit tests with PHPUnit on Travis CI">
<exec executable="phpunit" failonerror="true" >
<arg value="--filter=Symfony2_*" />
<arg value="/tmp/phpcs/tests/AllTests.php" />
</exec>
</target>
<target name="phpunit" description="Run unit tests with PHPUnit">
<exec executable="phpunit" failonerror="true" >
<arg value="--filter=Symfony2_*" />
<arg value="${basedir}/vendor/squizlabs/php_codesniffer/tests/AllTests.php" />
</exec>
</target>
<target name="phpcs" description="Find coding standard violations using PHP Code Sniffer">
<exec executable="phpcs">
<arg value="--standard=${phpcs.standard}" />
<arg value="--ignore=vendor/*" />
<arg path="${basedir}" />
</exec>
</target>
</project>