-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
74 lines (66 loc) · 2.32 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="UiTPAS Beheer" default="test">
<fileset id="php" dir="./">
<include name="**/*.php"/>
<exclude name="vendor/"/>
</fileset>
<target name="composer-validate">
<exec executable="composer" passthru="true" checkreturn="true">
<arg value="validate"/>
</exec>
</target>
<target name="swagger-validate">
<exec executable="npm" passthru="true" checkreturn="false">
<arg value="run"/>
<arg value="validate-swagger-lint"/>
</exec>
<exec executable="npm" passthru="true" checkreturn="false">
<arg value="run"/>
<arg value="validate-swagger-schema"/>
</exec>
</target>
<target name="githooks">
<copy file="contrib/pre-commit" todir=".git/hooks" />
</target>
<target name="coding-standards">
<exec command="vendor/bin/phpcs --config-set installed_paths vendor/escapestudios/symfony2-coding-standard"
passthru="true"/>
<phpcodesniffer
standard="phpcs-ruleset.xml"
format="full"
allowedFileExtensions="php"
haltonerror="false">
<fileset refid="php"/>
</phpcodesniffer>
</target>
<target name="phpcbf">
<exec command="vendor/bin/phpcbf test --standard=phpcs-ruleset.xml"
passthru="true"/>
<exec command="vendor/bin/phpcbf src --standard=phpcs-ruleset.xml"
passthru="true"/>
<exec command="vendor/bin/phpcbf app --standard=phpcs-ruleset.xml"
passthru="true"/>
</target>
<target name="lint">
<phplint>
<fileset refid="php"/>
</phplint>
</target>
<!--
The PHPUnit task of Phing does not support white-lists for code
coverage. Therefore we use the exec task instead.
-->
<target name="unit-tests">
<exec
command="./vendor/bin/phpunit"
checkreturn="true"
passthru="true"/>
</target>
<target name="test">
<phingcall target="composer-validate"/>
<phingcall target="lint"/>
<phingcall target="swagger-validate"/>
<phingcall target="unit-tests"/>
<phingcall target="coding-standards"/>
</target>
</project>