This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
87 lines (69 loc) · 3.85 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
79
80
81
82
83
84
85
86
87
<?xml version="1.0"?>
<project default="default" name="ZgPHP joind.in raffler backend">
<target name="default" description="Help target">
<exec command="phing -l" passthru="true"/>
</target>
<target name="test" depends="phpspec,phpunit,behat,fix-codestandards,phpstan"/>
<target name="fix-codestandards" depends="php-cs-fixer-fix,phpmd,phpcs"/>
<target name="check-codestandards" depends="php-cs-fixer-check,phpmd,phpcs"/>
<target name="php-cs-fixer-fix" description="Run php-cs-fixer fix">
<retry retrycount="3">
<exec command="./vendor/bin/php-cs-fixer fix" passthru="true" checkreturn="true"/>
</retry>
</target>
<target name="phpspec" description="Run phpspec">
<exec command="./vendor/bin/phpspec run" passthru="true" checkreturn="true"/>
</target>
<target name="phpunit" description="Run phpunit">
<exec command="./vendor/bin/phpunit" passthru="true" checkreturn="true"/>
</target>
<target name="behat" description="Run behat">
<exec command="./vendor/bin/behat" passthru="true" checkreturn="true"/>
</target>
<target name="phpstan" description="Run phpstan">
<exec command="./vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests features" passthru="true" checkreturn="true"/>
</target>
<target name="php-cs-fixer-check" description="Run php-cs-fixer check">
<exec command="./vendor/bin/php-cs-fixer fix --dry-run --diff" passthru="true" checkreturn="true"/>
</target>
<target name="phpmd" description="Run phpmd">
<phingcall target="phpmd-task">
<property name="path" value="src"/>
</phingcall>
<phingcall target="phpmd-task">
<property name="path" value="tests"/>
</phingcall>
</target>
<target name="phpcs" description="Run phpcs">
<phingcall target="phpcs-task">
<property name="path" value="src"/>
</phingcall>
<phingcall target="phpcs-task">
<property name="path" value="tests"/>
</phingcall>
</target>
<target name="phpmd-task" description="Run php mess detector">
<exec command="./vendor/bin/phpmd ${path} text phpmd.xml" passthru="true" checkreturn="true"/>
</target>
<target name="phpcs-task" description="Run php code sniffer">
<exec command="./vendor/bin/phpcs --standard=phpcs.xml ${path} -n" passthru="true" checkreturn="true"/>
</target>
<target name="refresh-dev-db" description="Refresh dev DB">
<exec command="bin/console doctrine:database:drop --force --if-exists --env=dev" passthru="true" checkreturn="true"/>
<exec command="bin/console doctrine:database:create --env=dev" passthru="true" checkreturn="true"/>
<exec command="bin/console doctrine:migrations:migrate --no-interaction --env=dev" passthru="true"/>
<exec command="bin/console doctrine:fixtures:load --verbose --append --env=dev" passthru="true"/>
</target>
<target name="refresh-test-db" description="Refresh dev DB">
<exec command="bin/console doctrine:database:drop --force --if-exists --env=test" passthru="true" checkreturn="true"/>
<exec command="bin/console doctrine:database:create --env=test" passthru="true" checkreturn="true"/>
<exec command="bin/console doctrine:migrations:migrate --no-interaction --env=test" passthru="true"/>
<exec command="bin/console doctrine:fixtures:load --verbose --append --env=test" passthru="true"/>
</target>
<target name="check-test-schema" description="Check test db schema">
<exec command="bin/console doctrine:schema:validate --env=test" passthru="true" checkreturn="true"/>
</target>
<target name="check-dev-schema" description="Check dev db schema">
<exec command="bin/console doctrine:schema:validate --env=dev" passthru="true" checkreturn="true"/>
</target>
</project>