]> git.immae.eu Git - github/wallabag/wallabag.git/blame_incremental - build.xml
fix #1502 avoid duplicate entry and store pocket url in config
[github/wallabag/wallabag.git] / build.xml
... / ...
CommitLineData
1<?xml version="1.0" encoding="UTF-8"?>
2<project name="wallabag" default="build">
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"/>
7
8 <target name="clean" description="Cleanup build artifacts">
9 <delete dir="${basedir}/app/cache"/>
10 </target>
11
12 <target name="composer" description="Install deps using Composer">
13 <exec executable="composer">
14 <arg value="install"/>
15 <arg value="--no-interaction"/>
16 <arg value="--no-progress"/>
17 </exec>
18 </target>
19
20 <target name="prepare" description="Prepare for build">
21 <exec executable="php">
22 <arg value="${basedir}/app/console"/>
23 <arg value="doctrine:database:drop"/>
24 <arg value="--force"/>
25 <arg value="--env=test"/>
26 </exec>
27 <exec executable="php">
28 <arg value="${basedir}/app/console"/>
29 <arg value="doctrine:database:create"/>
30 <arg value="--env=test"/>
31 </exec>
32 <exec executable="php">
33 <arg value="${basedir}/app/console"/>
34 <arg value="doctrine:schema:create"/>
35 <arg value="--env=test"/>
36 </exec>
37 <exec executable="php">
38 <arg value="${basedir}/app/console"/>
39 <arg value="cache:clear"/>
40 <arg value="--env=test"/>
41 </exec>
42 <exec executable="php">
43 <arg value="${basedir}/app/console"/>
44 <arg value="doctrine:fixtures:load"/>
45 <arg value="--no-interaction"/>
46 <arg value="--env=test"/>
47 </exec>
48 </target>
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
92 <target name="phpunit" description="Run unit tests with PHPUnit + HTML Coverage">
93 <exec executable="phpunit" failonerror="true">
94 <arg value="--coverage-html"/>
95 <arg value="build/coverage"/>
96 </exec>
97 </target>
98</project>