1 | <?xml version="1.0" encoding="utf-8" ?> |
---|
2 | <project name="EC-CUBE" basedir="." default="test"> |
---|
3 | <!-- Jenkins上でのみ実行するタスク --> |
---|
4 | <target name="prepare-jenkins"> |
---|
5 | <copy overwrite="true" file="data/config/config.php.jenkins" tofile="data/config/config.php"/> |
---|
6 | <copy overwrite="true" file="tests/phpunit.xml.jenkins" tofile="tests/phpunit.xml"/> |
---|
7 | </target> |
---|
8 | |
---|
9 | <target name="test"> |
---|
10 | <delete> |
---|
11 | <fileset dir="data/cache"> |
---|
12 | <include name="*"/> |
---|
13 | </fileset> |
---|
14 | </delete> |
---|
15 | <delete dir="reports" includeemptydirs="true" /> |
---|
16 | <mkdir dir="reports/coverage" /> |
---|
17 | <exec dir="." |
---|
18 | output="reports/stdout.log" |
---|
19 | error="reports/stderr.log" |
---|
20 | command="phpunit --log-tap reports/tap.log |
---|
21 | --log-junit reports/unitreport.xml |
---|
22 | --coverage-html reports/coverage |
---|
23 | --coverage-clover reports/coverage/coverage.xml |
---|
24 | --configuration tests/phpunit.xml |
---|
25 | tests/" /> |
---|
26 | </target> |
---|
27 | <target name="checkstyle" description="Find coding standard violations using PHP_CodeSniffer creating a log file for the continuous integration server"> |
---|
28 | <exec executable="phpcs" output="/dev/null"> |
---|
29 | <arg value="-v" /> |
---|
30 | <arg value="--report=checkstyle" /> |
---|
31 | <arg value="--standard=tests/ruleset.xml" /> |
---|
32 | <arg value="--extensions=php" /> |
---|
33 | <arg value="--ignore=data/Smarty,data/smarty_extends,data/cache,data/module,data/mtb_constants_init.php" /> |
---|
34 | <arg value="--report-file=reports/checkstyle.xml" /> |
---|
35 | <arg path="data/class/" /> |
---|
36 | </exec> |
---|
37 | </target> |
---|
38 | </project> |
---|