-
Notifications
You must be signed in to change notification settings - Fork 174
/
build.xml
47 lines (38 loc) · 1.55 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="joindin-responsive" default="build" basedir=".">
<property name="basedir" value="."/>
<target name="build" depends="composer,phplint,jsvalidate,phpunit,phpcs" />
<target name="composer" description="Run composer">
<exec command="composer install" logoutput="/dev/stdout" checkreturn="true" />
</target>
<target name="phplint" description="Run php -l over the fileset">
<phplint haltonfailure="true">
<fileset dir="${basedir}/app">
<patternset>
<include name="**/*.php"/>
</patternset>
</fileset>
</phplint>
</target>
<target name="phpcs">
<phpcodesniffer standard="PSR2" description="Run PSR2 standards over the codebase" haltonerror="true">
<fileset dir="${basedir}/app">
<include name="**/*.php"/>
</fileset>
<fileset dir="${basedir}/tests">
<include name="**/*.php"/>
</fileset>
<formatter type="full" usefile="false"/>
</phpcodesniffer>
</target>
<target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
<exec command="vendor/bin/phpunit -c tests/phpunit.xml" logoutput="/dev/stdout" checkreturn="true" />
</target>
<target name="jsvalidate" description="Use jsvalidate to lint check the JS">
<exec command="npm install" logoutput="/dev/stdout" />
<exec command="grunt jsvalidate" logoutput="/dev/stdout" checkreturn="true" />
</target>
<target name="launch">
<exec command="scripts/jenkinslaunch.sh" checkreturn="true" passthru="true"/>
</target>
</project>