forked from joindin/joindin-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
37 lines (30 loc) · 1.17 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="joindin" basedir="." default="app">
<property name="builddir" value="./build" />
<target name="clean">
<echo msg="Clean..." />
<delete dir="${builddir}" />
</target>
<target name="prepare">
<echo msg="Prepare..." />
<mkdir dir="${builddir}" />
<mkdir dir="${builddir}/logs" />
<mkdir dir="${builddir}/logs/coverage" />
</target>
<!-- PHP CodeSniffer -->
<target name="phpcs">
<echo msg="PHP CodeSniffer..." />
<exec command="phpcs --standard=PEAR --report=checkstyle ./src/system/application > ${builddir}/logs/checkstyle.xml" escape="false" logoutput="true" />
</target>
<!-- Unit Tests -->
<target name="phpunit">
<echo msg="PHP Unit..." />
<exec command="phpunit ./src/tests" logoutput="true" />
</target>
<!-- Full reported unit tests & coverage analysis -->
<target name="fullphpunit">
<echo msg="PHP Unit..." />
<exec command="phpunit --log-junit ${builddir}/logs/phpunit.xml --coverage-clover ${builddir}/logs/coverage/clover.xml --coverage-html ${builddir}/logs/coverage/ ./src/tests" logoutput="true" />
</target>
<target name="app" depends="clean, prepare, phpcs, fullphpunit"/>
</project>