-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
78 lines (64 loc) · 2.46 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0" encoding="UTF-8"?>
<project name="PlantUml to image" default="help" phingVersion="3"
description="PlantUml wrapper to convert puml diagrams to images">
<property name="composer.options" value="--dev"/>
<target name="setup" depends="composer:install"/>
<target name="qa" depends="php:lint,composer:normalize,composer:validate,psalm:run,phpunit:run"/>
<target name="php:lint" description="Check PHP syntax">
<phplint haltonfailure="true">
<fileset dir="${project.basedir}">
<include name="src/**/*.php"/>
<include name="tests/**/*.php"/>
</fileset>
</phplint>
</target>
<target name="help">
<uptodate property="uptodate.visualizer" srcfile="build.xml" targetfile="build.svg"/>
<runtarget target="map"/>
<open path="build.svg"/>
</target>
<target name="map" unless="uptodate.visualizer" description="Create buildfile map">
<visualizer format="svg"/>
</target>
<target name="psalm:run" description="Check code with Psalm">
<exec executable="vendor/bin/psalm" checkreturn="true" passthru="true">
<arg line="--no-cache --long-progress"/>
</exec>
</target>
<target name="phpunit:run" description="Run unitary tests">
<exec executable="vendor/bin/phpunit" checkreturn="true" passthru="true">
<env key="XDEBUG_MODE" value="coverage"/>
</exec>
</target>
<target name="phpunit:testdox" description="Run unitary tests with testdox">
<exec executable="vendor/bin/phpunit" checkreturn="true" passthru="true">
<env key="XDEBUG_MODE" value="coverage"/>
<arg value="--testdox"/>
</exec>
</target>
<target name="composer:install" description="PHP dependencies">
<!-- Use --no-dev for prod -->
<composer command="install">
<arg value="--no-interaction"/>
<arg value="--prefer-dist"/>
<arg value="--no-progress"/>
<arg value="--ansi"/>
<arg value="${composer.options}"/>
</composer>
</target>
<target name="composer:validate" description="Validate composer.json">
<composer command="validate">
<arg value="--ansi"/>
<arg value="--no-interaction"/>
</composer>
</target>
<target name="composer:normalize" description="Normalize composer.json">
<composer command="normalize">
<arg value="--ansi"/>
<arg value="--no-interaction"/>
<arg value="--diff"/>
<arg value="--indent-size=2"/>
<arg value="--indent-style=space"/>
</composer>
</target>
</project>