-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
80 lines (71 loc) · 2.56 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8"?>
<project name="welo" default="build-local">
<target name="build-local"
description="local build"
depends="prepare,lint,phpunit,phpunit-i,behat"/>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build/logs"/>
</target>
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/logs"/>
</target>
<target name="lint" description="Perform syntax check of sourcecode files">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}">
<include name="**/*.php" />
<exclude name="**/vendor/**" />
<exclude name="**/tests/**" />
<modified />
</fileset>
</apply>
</target>
<target name="phpunit" description="Run unit tests with PHPUnit">
<exec executable="./vendor/bin/phpunit" failonerror="true">
<arg value="-d" />
<arg value="memory_limit=256M" />
<arg value="--whitelist" />
<arg value="${basedir}/module" />
<arg value="--coverage-crap4j" />
<arg value="${basedir}/build/logs/crap4j.xml" />
<arg value="--coverage-clover" />
<arg value="${basedir}/build/logs/clover.xml" />
<arg value="--log-junit" />
<arg value="${basedir}/build/logs/junit.xml" />
<arg value="-c" />
<arg value="${basedir}/tests/unit/phpunit.xml" />
</exec>
</target>
<target name="phpunit-i" description="Run integration tests with PHPUnit">
<exec executable="./vendor/bin/phpunit" failonerror="true">
<arg value="-d" />
<arg value="memory_limit=256M" />
<arg value="-c" />
<arg value="${basedir}/tests/integration/phpunit.xml" />
</exec>
</target>
<target name="behat" description="Run functional tests with Behat">
<exec executable="vendor/bin/behat" failonerror="true">
<arg value="-c" />
<arg value="${basedir}/tests/behat.yml" />
<arg value="-f" />
<arg value="progress" />
</exec>
</target>
<target name="build-db" description="Drop and creates db and loads fixtures">
<exec dir="${basedir}"
executable="vendor/bin/doctrine-module" failonerror="true">
<arg value="orm:schema-tool:drop" />
<arg value="--force" />
</exec>
<exec dir="${basedir}"
executable="vendor/bin/doctrine-module" failonerror="true">
<arg value="orm:schema-tool:create" />
</exec>
<exec dir="${basedir}"
executable="vendor/bin/doctrine-module" failonerror="true">
<arg value="dbal:import" />
<arg value="tests/sql/init.sql" />
</exec>
</target>
</project>