-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
39 lines (32 loc) · 1.15 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Laravel Config" default="build">
<target name="build" depends="lint,phpunit,-check-failure"/>
<target name="lint">
<apply executable="php" failonerror="true" taskname="lint">
<arg value="-l"/>
<fileset dir="${basedir}/src">
<include name="**/*.php"/>
<modified/>
</fileset>
<fileset dir="${basedir}/tests">
<include name="**/*.php"/>
<modified/>
</fileset>
</apply>
</target>
<target name="phpunit" description="Run unit tests with PHPUnit">
<exec executable="vendor/bin/phpunit" resultproperty="result.phpunit" taskname="phpunit">
<arg value="--configuration"/>
<arg path="${basedir}/build/phpunit.xml"/>
</exec>
</target>
<target name="-check-failure">
<fail message="PHPUnit did not finish successfully">
<condition>
<not>
<equals arg1="${result.phpunit}" arg2="0"/>
</not>
</condition>
</fail>
</target>
</project>