]> git.immae.eu Git - github/wallabag/wallabag.git/blame - build.xml
Fix display the form errors correctly
[github/wallabag/wallabag.git] / build.xml
CommitLineData
aa6e27cf
J
1<?xml version="1.0" encoding="UTF-8"?>
2<project name="wallabag" default="build">
3ee1582e 3 <target name="build" depends="clean,prepare,phpunit"/>
a48b5d5a
JB
4 <target name="prepare-mysql" depends="clean,prepare_mysql"/>
5 <target name="prepare-sqlite" depends="clean,prepare_sqlite"/>
6 <target name="prepare-pgsql" depends="clean,prepare_pgsql"/>
aa6e27cf
J
7
8 <target name="clean" description="Cleanup build artifacts">
ccf50a9f 9 <delete dir="${basedir}/var/cache"/>
aa6e27cf
J
10 </target>
11
03fb6fde 12 <target name="prepare" description="Prepare for build">
c5772d11 13 <exec executable="php">
ccf50a9f 14 <arg value="${basedir}/bin/console"/>
c5772d11
J
15 <arg value="doctrine:database:drop"/>
16 <arg value="--force"/>
17 <arg value="--env=test"/>
18 </exec>
19 <exec executable="php">
ccf50a9f 20 <arg value="${basedir}/bin/console"/>
c5772d11
J
21 <arg value="doctrine:database:create"/>
22 <arg value="--env=test"/>
23 </exec>
9c0c8820 24 <exec executable="php">
ccf50a9f 25 <arg value="${basedir}/bin/console"/>
9c0c8820
J
26 <arg value="doctrine:schema:create"/>
27 <arg value="--env=test"/>
28 </exec>
3b815d2d 29 <exec executable="php">
ccf50a9f 30 <arg value="${basedir}/bin/console"/>
3b815d2d
J
31 <arg value="doctrine:fixtures:load"/>
32 <arg value="--no-interaction"/>
3b815d2d
J
33 <arg value="--env=test"/>
34 </exec>
aa6e27cf 35 </target>
276a1e9d 36
cafb1056 37 <target name="prepare_mysql" description="Run test for MySQL">
03fb6fde
JB
38 <delete dir="${basedir}/app/config/parameters.yml"/>
39 <exec executable="cp">
86732aa0
JB
40 <arg value="${basedir}/app/config/tests/parameters_test.mysql.yml"/>
41 <arg value="${basedir}/app/config/parameters_test.yml"/>
03fb6fde 42 </exec>
03fb6fde 43 <exec executable="php">
ccf50a9f 44 <arg value="${basedir}/bin/console"/>
03fb6fde
JB
45 <arg value="cache:clear"/>
46 <arg value="--env=test"/>
47 </exec>
a48b5d5a
JB
48 <exec executable="php">
49 <arg value="${basedir}/bin/console"/>
50 <arg value="doctrine:database:drop"/>
51 <arg value="--force"/>
52 <arg value="--env=test"/>
53 </exec>
54 <exec executable="php">
55 <arg value="${basedir}/bin/console"/>
56 <arg value="doctrine:database:create"/>
57 <arg value="--env=test"/>
58 </exec>
59 <exec executable="php">
60 <arg value="${basedir}/bin/console"/>
61 <arg value="doctrine:database:import"/>
62 <arg value="data/sql/mysql_base.sql"/>
63 <arg value="--env=test"/>
64 </exec>
65 <exec executable="php">
66 <arg value="${basedir}/bin/console"/>
67 <arg value="doctrine:migrations:migrate"/>
68 <arg value="--no-interaction"/>
69 <arg value="--env=test"/>
70 </exec>
71 <exec executable="php">
72 <arg value="${basedir}/bin/console"/>
73 <arg value="doctrine:fixtures:load"/>
74 <arg value="--no-interaction"/>
75 <arg value="--env=test"/>
76 </exec>
03fb6fde
JB
77 </target>
78
cafb1056 79 <target name="prepare_sqlite" description="Run test for SQLite">
03fb6fde
JB
80 <delete dir="${basedir}/app/config/parameters.yml"/>
81 <exec executable="cp">
86732aa0
JB
82 <arg value="${basedir}/app/config/tests/parameters_test.sqlite.yml"/>
83 <arg value="${basedir}/app/config/parameters_test.yml"/>
03fb6fde 84 </exec>
03fb6fde 85 <exec executable="php">
ccf50a9f 86 <arg value="${basedir}/bin/console"/>
03fb6fde
JB
87 <arg value="cache:clear"/>
88 <arg value="--env=test"/>
89 </exec>
a48b5d5a
JB
90 <exec executable="php">
91 <arg value="${basedir}/bin/console"/>
92 <arg value="doctrine:database:drop"/>
93 <arg value="--force"/>
94 <arg value="--env=test"/>
95 </exec>
96 <exec executable="php">
97 <arg value="${basedir}/bin/console"/>
98 <arg value="doctrine:database:create"/>
99 <arg value="--env=test"/>
100 </exec>
81915ad8
JB
101 <exec executable="php">
102 <arg value="${basedir}/bin/console"/>
103 <arg value="doctrine:schema:create"/>
104 <arg value="--env=test"/>
a48b5d5a
JB
105 </exec>
106 <exec executable="php">
107 <arg value="${basedir}/bin/console"/>
108 <arg value="doctrine:migrations:migrate"/>
109 <arg value="--no-interaction"/>
110 <arg value="--env=test"/>
111 </exec>
112 <exec executable="php">
113 <arg value="${basedir}/bin/console"/>
114 <arg value="doctrine:fixtures:load"/>
115 <arg value="--no-interaction"/>
116 <arg value="--env=test"/>
117 </exec>
03fb6fde
JB
118 </target>
119
cafb1056 120 <target name="prepare_pgsql" description="Run test for PostgreSQL">
03fb6fde
JB
121 <delete dir="${basedir}/app/config/parameters.yml"/>
122 <exec executable="cp">
86732aa0
JB
123 <arg value="${basedir}/app/config/tests/parameters_test.pgsql.yml"/>
124 <arg value="${basedir}/app/config/parameters_test.yml"/>
03fb6fde 125 </exec>
03fb6fde 126 <exec executable="php">
ccf50a9f 127 <arg value="${basedir}/bin/console"/>
03fb6fde
JB
128 <arg value="cache:clear"/>
129 <arg value="--env=test"/>
130 </exec>
a48b5d5a
JB
131 <exec executable="php">
132 <arg value="${basedir}/bin/console"/>
133 <arg value="doctrine:database:drop"/>
134 <arg value="--force"/>
135 <arg value="--env=test"/>
136 </exec>
137 <exec executable="php">
138 <arg value="${basedir}/bin/console"/>
139 <arg value="doctrine:database:create"/>
140 <arg value="--env=test"/>
141 </exec>
cafb1056 142 <exec executable="psql">
cafb1056
JB
143 <arg value="-h"/>
144 <arg value="localhost"/>
145 <arg value="-d"/>
146 <arg value="wallabag_test"/>
147 <arg value="-U"/>
148 <arg value="travis"/>
149 <arg value="-f"/>
150 <arg value="data/sql/pgsql_base.sql"/>
a48b5d5a 151 </exec>
d9efa42f
JB
152 <exec executable="php">
153 <arg value="${basedir}/bin/console"/>
154 <arg value="doctrine:migrations:migrate"/>
155 <arg value="--no-interaction"/>
156 <arg value="--env=test"/>
157 </exec>
a48b5d5a
JB
158 <exec executable="php">
159 <arg value="${basedir}/bin/console"/>
160 <arg value="doctrine:fixtures:load"/>
161 <arg value="--no-interaction"/>
162 <arg value="--env=test"/>
163 </exec>
03fb6fde
JB
164 </target>
165
276a1e9d
J
166 <target name="phpunit" description="Run unit tests with PHPUnit + HTML Coverage">
167 <exec executable="phpunit" failonerror="true">
168 <arg value="--coverage-html"/>
169 <arg value="build/coverage"/>
170 </exec>
171 </target>
aa6e27cf 172</project>