-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
77 lines (77 loc) · 2.79 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
<?xml version="1.0" encoding="utf-8"?>
<project name="My Tester" basedir="." default="test">
<target name="test">
<delete verbose="true" failonerror="false">
<fileset dir="${project.basedir}/tests/temp/cache/nette.configurator">
<include name="Container_*"/>
</fileset>
</delete>
<exec executable="composer" logoutput="true" passthru="true" checkreturn="true">
<arg value="install"/>
<arg value="--prefer-dist"/>
<arg value="--no-progress"/>
<arg value="--no-interaction"/>
</exec>
<if>
<not>
<isset property="env.REPORTS"/>
</not>
<then>
<exec executable="vendor/bin/parallel-lint" logoutput="true" passthru="true" checkreturn="true">
<arg path="src"/>
<arg path="tests"/>
<arg value="-e"/>
<arg value="php"/>
<arg value="--colors"/>
<arg value="--exclude"/>
<arg path="tests/temp"/>
</exec>
<exec executable="vendor/bin/phpcs" logoutput="true" passthru="true" checkreturn="true">
<arg value="."/>
<arg value="--colors"/>
</exec>
</then>
</if>
<if>
<isset property="env.REPORTS"/>
<then>
<exec executable="vendor/bin/phpstan" logoutput="true" passthru="true" checkreturn="true">
<arg line="analyze --error-format=gitlab | tee phpstan.json"/>
</exec>
</then>
<else>
<exec executable="vendor/bin/phpstan" logoutput="true" passthru="true" checkreturn="true">
<arg value="analyze"/>
</exec>
</else>
</if>
<if>
<isset property="env.REPORTS"/>
<then>
<exec executable="src/mytester" logoutput="true" passthru="true" checkreturn="true">
<arg value="--colors"/>
<arg value="--resultsFormat"/>
<arg value="junit"/>
</exec>
</then>
<else>
<exec executable="src/mytester" logoutput="true" passthru="true" checkreturn="true" osFamily="unix">
<arg value="--colors"/>
</exec>
<exec executable="php" logoutput="true" passthru="true" checkreturn="true" osFamily="windows">
<arg value="src/mytester"/>
<arg value="--colors"/>
</exec>
</else>
</if>
<exec executable="tests/NetteDI.php" logoutput="true" passthru="true" checkreturn="true" osFamily="unix"/>
<exec executable="php" logoutput="true" passthru="true" checkreturn="true" osFamily="windows">
<arg value="tests/NetteDI.php"/>
</exec>
<!-- It is run 2 times because the first run doesn't go through all code that it should -->
<exec executable="tests/NetteDI.php" logoutput="true" passthru="true" checkreturn="true" osFamily="unix"/>
<exec executable="php" logoutput="true" passthru="true" checkreturn="true" osFamily="windows">
<arg value="tests/NetteDI.php"/>
</exec>
</target>
</project>