-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
executable file
·56 lines (51 loc) · 2.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0" encoding="UTF-8"?>
<project name="shop_categories" default="build">
<property name="basedir" value="." />
<property name="phpunit" value="${basedir}/app/common/library/vendor/bin/phpunit"/>
<target name="build" depends="composer-install, swagger" />
<target name="composer-update">
<echo>Running composer update</echo>
<exec executable="php" dir="${basedir}/protected/" failonerror="true">
<arg line="composer.phar" />
<arg line="update" />
<arg line="--lock" />
<arg line="--no-scripts" />
</exec>
</target>
<target name="composer-install">
<echo>Running composer install</echo>
<exec executable="composer" dir="${basedir}/app/common/library/" failonerror="true">
<arg line="install" />
</exec>
</target>
<target name="phpunit" unless="phpunit.done" description="Run unit tests with PHPUnit.">
<exec executable="${phpunit}" resultproperty="result.phpunit" taskname="phpunit" dir="${basedir}/tests/" failonerror="true">
<arg value="--configuration"/>
<arg path="${basedir}/tests/phpunit.xml"/>
<arg path="tests"/>
</exec>
<property name="phpunit.done" value="true"/>
</target>
<target name="phpunit-coverage">
<exec executable="${phpunit}" dir="${basedir}/tests/" failonerror="true">
<arg value="--configuration"/>
<arg path="${basedir}/tests/phpunit.xml"/>
<arg line="--coverage-html" />
<arg line="${basedir}/../phpunit-reports/shop_categories" />
</exec>
</target>
<target name="swagger">
<echo>Generate swagger docs</echo>
<exec executable="php" dir="${basedir}/protected/" failonerror="true">
<arg line="${basedir}/protected/swagger.php" />
<arg line="${basedir}/protected/modules" />
</exec>
</target>
<target name="migrate">
<echo>Running migrations</echo>
<exec executable="phalcon" failonerror="true">
<arg line="migration" />
<arg line="--action=run" />
</exec>
</target>
</project>