forked from protalk/protalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
48 lines (38 loc) · 1.47 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Protalk" default="build">
<target name="build"
depends="prepare,lint,phpcs,phpunit"/>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build/coverage"/>
<delete dir="${basedir}/build/logs"/>
</target>
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/logs"/>
</target>
<exec executable="php">
<arg line="bin/composer.phar install --dev" />
</exec>
<exec executable="php">
<arg line="app/console cache:clear --env=test --no-warmup" />
</exec>
<target name="lint">
<apply executable="php" failonerror="false">
<arg value="-l"/>
<fileset dir="${basedir}/src">
<include name="**/*.php"/>
<modified/>
</fileset>
</apply>
</target>
<target name="phpcs"
description="Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
<exec executable="phpcs">
<arg value="--standard=PSR2" />
<arg path="${basedir}/src" />
</exec>
</target>
<target name="phpunit" description="Run unit tests with PHPUnit">
<exec executable="phpunit" failonerror="true"/>
</target>
</project>