]> git.immae.eu Git - github/wallabag/wallabag.git/blame - build.xml
Add RabbitMQ service for Travis CI
[github/wallabag/wallabag.git] / build.xml
CommitLineData
aa6e27cf
J
1<?xml version="1.0" encoding="UTF-8"?>
2<project name="wallabag" default="build">
3ee1582e
JB
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"/>
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>
aa6e27cf 29 <exec executable="php">
ccf50a9f 30 <arg value="${basedir}/bin/console"/>
aa6e27cf
J
31 <arg value="cache:clear"/>
32 <arg value="--env=test"/>
33 </exec>
3b815d2d 34 <exec executable="php">
ccf50a9f 35 <arg value="${basedir}/bin/console"/>
3b815d2d
J
36 <arg value="doctrine:fixtures:load"/>
37 <arg value="--no-interaction"/>
3b815d2d
J
38 <arg value="--env=test"/>
39 </exec>
aa6e27cf 40 </target>
276a1e9d 41
03fb6fde
JB
42 <target name="db_mysql" description="Run test for MySQL">
43 <delete dir="${basedir}/app/config/parameters.yml"/>
44 <exec executable="cp">
86732aa0
JB
45 <arg value="${basedir}/app/config/tests/parameters_test.mysql.yml"/>
46 <arg value="${basedir}/app/config/parameters_test.yml"/>
03fb6fde
JB
47 </exec>
48
49 <exec executable="php">
ccf50a9f 50 <arg value="${basedir}/bin/console"/>
03fb6fde
JB
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">
86732aa0
JB
59 <arg value="${basedir}/app/config/tests/parameters_test.sqlite.yml"/>
60 <arg value="${basedir}/app/config/parameters_test.yml"/>
03fb6fde
JB
61 </exec>
62
63 <exec executable="php">
ccf50a9f 64 <arg value="${basedir}/bin/console"/>
03fb6fde
JB
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">
86732aa0
JB
73 <arg value="${basedir}/app/config/tests/parameters_test.pgsql.yml"/>
74 <arg value="${basedir}/app/config/parameters_test.yml"/>
03fb6fde
JB
75 </exec>
76
77 <exec executable="php">
ccf50a9f 78 <arg value="${basedir}/bin/console"/>
03fb6fde
JB
79 <arg value="cache:clear"/>
80 <arg value="--env=test"/>
81 </exec>
82 </target>
83
276a1e9d
J
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>
aa6e27cf 90</project>