-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
36 lines (34 loc) · 1.65 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="CDDemo" default="commit-stage">
<target name="commit-stage" depends="delete-reports, static-analysis, unit-test, mutation-test, metrics"/>
<target name="delete-reports">
<delete dir="reports/generated" includeemptydirs="false"/>
</target>
<target name="static-analysis">
<exec executable="vendor/bin/psalm" passthru="true" checkreturn="true"/>
</target>
<target name="unit-test">
<exec executable="bin/phpunit" passthru="true" checkreturn="true"/>
<phpunitreport
todir="reports/generated/phpunit"
infile="reports/generated/phpunit/phpunit.xml"
format="frames"
usesorttable="true"
/>
</target>
<target name="metrics">
<exec executable="vendor/bin/phpmetrics" passthru="false" checkreturn="true">
<arg line="--report-html=reports/generated/phpmetrics/src --junit=reports/generated/phpunit/phpunit.xml src"/>
</exec>
<exec executable="vendor/bin/phpmetrics" passthru="false" checkreturn="true">
<arg line="--report-html=reports/generated/phpmetrics/tests tests"/> <!-- it looks like phpmetrics ignores my test class for some reason -->
</exec>
</target>
<target name="mutation-test">
<exec executable="bin/download-tools" passthru="true" checkreturn="true"/>
<mkdir dir="reports/generated"/>
<mkdir dir="reports/generated/infection"/>
<exec command="phpdbg -qrr bin/infection" passthru="true" checkreturn="true" output="reports/generated/infection/infection.txt">
</exec>
</target>
</project>