forked from joindin/joindin-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
62 lines (48 loc) · 2.47 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0" encoding="UTF-8"?>
<project name="joindin" default="build" basedir=".">
<property name="apiv2source" value="src" />
<property name="basedir" value="."/>
<target name="initialize" description="Do Some initial setup.">
<exec command="wget https://raw.githubusercontent.com/composer/getcomposer.org/cb19f2aa3aeaa2006c0cd69a7ef011eb31463067/web/installer -O - -q | php -- --quiet" logoutput="true" checkreturn="true" />
<exec command="sudo mv composer.phar /usr/bin/composer"/>
<exec command="composer install"/>
</target>
<target name="clean" description="Clean up and create artifact directories">
<delete dir="${basedir}/build/api"/>
<delete dir="${basedir}/build/coverage"/>
<delete dir="${basedir}/build/logs"/>
<delete dir="${basedir}/build/pdepend"/>
<mkdir dir="${basedir}/build/api"/>
<mkdir dir="${basedir}/build/code-browser"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/pdepend"/>
</target>
<target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
<exec command="composer test" logoutput="true" checkreturn="true" />
</target>
<target name="buildTasks" description="Run the phpmd, phpcs, phploc and lint tasks.">
<phingcall target="phpcs"/>
<phingcall target="lint"/>
</target>
<target name="frisby" description="Run API tests in Frisby">
<exec command="jasmine-node --nocolor --junitreport --output ../../build/logs/frisby/ api_spec.js"
dir="${basedir}/tests/frisby" checkreturn="true" logoutput="true">
</exec>
</target>
<target name="frisby-write" description="Run write-sensitive API tests in Frisby">
<exec command="jasmine-node --nocolor --junitreport --output ../../build/logs/frisby/ api_write_spec.js"
dir="${basedir}/tests/frisby" checkreturn="true" logoutput="true">
</exec>
</target>
<target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
<exec command="vendor/bin/phpcs --extensions=php --report-checkstyle=build/logs/checkstyle.xml --runtime-set ignore_warnings_on_exit true -p ."/>
</target>
<target name="lint" description="Run linter over the fileset">
<exec command="composer lint" logoutput="true" checkreturn="true" />
</target>
<target name="build" depends="initialize,clean,buildTasks,phpunit"/>
<target name="launch">
<exec command="scripts/jenkinslaunch.sh" checkreturn="true" logoutput="true" />
</target>
</project>