aboutsummaryrefslogtreecommitdiffhomepage
path: root/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml52
1 files changed, 50 insertions, 2 deletions
diff --git a/build.xml b/build.xml
index 30ed2fa1..110011e8 100644
--- a/build.xml
+++ b/build.xml
@@ -1,17 +1,23 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<project name="wallabag" default="build"> 2<project name="wallabag" default="build">
3 <target name="build" depends="prepare"/> 3 <target name="build" depends="clean,composer,prepare,phpunit"/>
4 <target name="prepare-mysql" depends="clean,composer,db_mysql,prepare"/>
5 <target name="prepare-sqlite" depends="clean,composer,db_sqlite,prepare"/>
6 <target name="prepare-pgsql" depends="clean,composer,db_pgsql,prepare"/>
4 7
5 <target name="clean" description="Cleanup build artifacts"> 8 <target name="clean" description="Cleanup build artifacts">
6 <delete dir="${basedir}/app/cache"/> 9 <delete dir="${basedir}/app/cache"/>
7 </target> 10 </target>
8 11
9 <target name="prepare" depends="clean" description="Prepare for build"> 12 <target name="composer" description="Install deps using Composer">
10 <exec executable="composer"> 13 <exec executable="composer">
11 <arg value="install"/> 14 <arg value="install"/>
12 <arg value="--no-interaction"/> 15 <arg value="--no-interaction"/>
13 <arg value="--no-progress"/> 16 <arg value="--no-progress"/>
14 </exec> 17 </exec>
18 </target>
19
20 <target name="prepare" description="Prepare for build">
15 <exec executable="php"> 21 <exec executable="php">
16 <arg value="${basedir}/app/console"/> 22 <arg value="${basedir}/app/console"/>
17 <arg value="doctrine:database:drop"/> 23 <arg value="doctrine:database:drop"/>
@@ -41,6 +47,48 @@
41 </exec> 47 </exec>
42 </target> 48 </target>
43 49
50 <target name="db_mysql" description="Run test for MySQL">
51 <delete dir="${basedir}/app/config/parameters.yml"/>
52 <exec executable="cp">
53 <arg value="${basedir}/app/config/tests/parameters.yml.dist.mysql"/>
54 <arg value="${basedir}/app/config/parameters.yml"/>
55 </exec>
56
57 <exec executable="php">
58 <arg value="${basedir}/app/console"/>
59 <arg value="cache:clear"/>
60 <arg value="--env=test"/>
61 </exec>
62 </target>
63
64 <target name="db_sqlite" description="Run test for SQLite">
65 <delete dir="${basedir}/app/config/parameters.yml"/>
66 <exec executable="cp">
67 <arg value="${basedir}/app/config/tests/parameters.yml.dist.sqlite"/>
68 <arg value="${basedir}/app/config/parameters.yml"/>
69 </exec>
70
71 <exec executable="php">
72 <arg value="${basedir}/app/console"/>
73 <arg value="cache:clear"/>
74 <arg value="--env=test"/>
75 </exec>
76 </target>
77
78 <target name="db_pgsql" description="Run test for PostgreSQL">
79 <delete dir="${basedir}/app/config/parameters.yml"/>
80 <exec executable="cp">
81 <arg value="${basedir}/app/config/tests/parameters.yml.dist.pgsql"/>
82 <arg value="${basedir}/app/config/parameters.yml"/>
83 </exec>
84
85 <exec executable="php">
86 <arg value="${basedir}/app/console"/>
87 <arg value="cache:clear"/>
88 <arg value="--env=test"/>
89 </exec>
90 </target>
91
44 <target name="phpunit" description="Run unit tests with PHPUnit + HTML Coverage"> 92 <target name="phpunit" description="Run unit tests with PHPUnit + HTML Coverage">
45 <exec executable="phpunit" failonerror="true"> 93 <exec executable="phpunit" failonerror="true">
46 <arg value="--coverage-html"/> 94 <arg value="--coverage-html"/>