]> git.immae.eu Git - github/wallabag/wallabag.git/blob - build.xml
typo and build on test
[github/wallabag/wallabag.git] / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="wallabag" default="build">
3 <target name="build" depends="clean,prepare,phpunit"/>
4 <target name="prepare-mysql" depends="clean,db_mysql,prepare"/>
5 <target name="prepare-sqlite" depends="clean,db_sqlite,prepare"/>
6 <target name="prepare-pgsql" depends="clean,db_pgsql,prepare"/>
7
8 <target name="clean" description="Cleanup build artifacts">
9 <delete dir="${basedir}/var/cache"/>
10 </target>
11
12 <target name="prepare" description="Prepare for build">
13 <exec executable="php">
14 <arg value="${basedir}/bin/console"/>
15 <arg value="doctrine:database:drop"/>
16 <arg value="--force"/>
17 <arg value="--env=test"/>
18 </exec>
19 <exec executable="php">
20 <arg value="${basedir}/bin/console"/>
21 <arg value="doctrine:database:create"/>
22 <arg value="--env=test"/>
23 </exec>
24 <exec executable="php">
25 <arg value="${basedir}/bin/console"/>
26 <arg value="doctrine:schema:create"/>
27 <arg value="--env=test"/>
28 </exec>
29 <exec executable="php">
30 <arg value="${basedir}/bin/console"/>
31 <arg value="cache:clear"/>
32 <arg value="--env=test"/>
33 </exec>
34 <exec executable="php">
35 <arg value="${basedir}/bin/console"/>
36 <arg value="doctrine:fixtures:load"/>
37 <arg value="--no-interaction"/>
38 <arg value="--env=test"/>
39 </exec>
40 </target>
41
42 <target name="db_mysql" description="Run test for MySQL">
43 <delete dir="${basedir}/app/config/parameters.yml"/>
44 <exec executable="cp">
45 <arg value="${basedir}/app/config/tests/parameters_test.mysql.yml"/>
46 <arg value="${basedir}/app/config/parameters_test.yml"/>
47 </exec>
48
49 <exec executable="php">
50 <arg value="${basedir}/bin/console"/>
51 <arg value="cache:clear"/>
52 <arg value="--env=test"/>
53 </exec>
54 </target>
55
56 <target name="db_sqlite" description="Run test for SQLite">
57 <delete dir="${basedir}/app/config/parameters.yml"/>
58 <exec executable="cp">
59 <arg value="${basedir}/app/config/tests/parameters_test.sqlite.yml"/>
60 <arg value="${basedir}/app/config/parameters_test.yml"/>
61 </exec>
62
63 <exec executable="php">
64 <arg value="${basedir}/bin/console"/>
65 <arg value="cache:clear"/>
66 <arg value="--env=test"/>
67 </exec>
68 </target>
69
70 <target name="db_pgsql" description="Run test for PostgreSQL">
71 <delete dir="${basedir}/app/config/parameters.yml"/>
72 <exec executable="cp">
73 <arg value="${basedir}/app/config/tests/parameters_test.pgsql.yml"/>
74 <arg value="${basedir}/app/config/parameters_test.yml"/>
75 </exec>
76
77 <exec executable="php">
78 <arg value="${basedir}/bin/console"/>
79 <arg value="cache:clear"/>
80 <arg value="--env=test"/>
81 </exec>
82 </target>
83
84 <target name="phpunit" description="Run unit tests with PHPUnit + HTML Coverage">
85 <exec executable="phpunit" failonerror="true">
86 <arg value="--coverage-html"/>
87 <arg value="build/coverage"/>
88 </exec>
89 </target>
90 </project>