forked from kaz29/blogapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
43 lines (40 loc) · 1.72 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Phing build config file.
@link http://www.phing.info/
-->
<project name="blogapp" default="build">
<!-- Properties -->
<property name="basedir" value="${phing.dir}" />
<property name="appdir" value="${basedir}/app" />
<property name="logdir" value="${appdir}/tmp/logs" />
<!-- Build(1) -->
<target name="build" depends="prepare,caketest,behat"/>
<target name="behat" description="Run CakePHP acceptance test with Behat">
<exec command="find ${appdir}/tmp -type d -print | xargs chmod 777" escape="false" />
<exec dir="${appdir}" executable="${appdir}/Console/cake" output="${logdir}/behat.log" checkreturn="true">
<arg line="Bdd.story" />
<arg line="--format=junit" />
<arg line="--out=${appdir}/reports" />
</exec>
</target>
<!-- Prepare(2) -->
<target name="prepare" description="Prepare for build">
<exec dir="${appdir}" executable="${appdir}/Console/cake" output="${logdir}/migration.log" checkreturn="true">
<arg line="migrations.migration" />
<arg line="run" />
<arg line="all" />
</exec>
</target>
<!-- CakePHP unit test with PHPUnit(3) -->
<target name="caketest" description="Run CakePHP unit tests with PHPUnit">
<exec dir="${appdir}" executable="${appdir}/Console/cake" output="${logdir}/caketest.log" checkreturn="true">
<arg line="test" />
<arg line="--log-junit=${appdir}/reports/unittest.xml" />
<arg line="--coverage-html=${appdir}/reports" />
<arg line="--coverage-clover=${appdir}/reports/coverage.xml" />
<arg line="app" />
<arg line="AllTests" />
</exec>
</target>
</project>