-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
87 lines (76 loc) · 2.8 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
<project name="abacaphiliac/aws-sdk-php-claim-check" default="develop" basedir=".">
<property name="fixtures" value="wiremock" override="true"/>
<target name="develop">
<phingcall target="lint"/>
<phingcall target="tests"/>
</target>
<target name="lint">
<phingcall target="php-lint"/>
<phingcall target="phpcs"/>
</target>
<target name="php-lint">
<exec command="vendor/bin/parallel-lint src tests"
passthru="true"
output="/dev/stdout"
error="/dev/stdout"
checkreturn="true"/>
</target>
<target name="phpcs">
<exec command="vendor/bin/phpcs --standard=PSR2 --extensions=php --severity=1 --colors -p src/ tests/"
passthru="true"
output="/dev/stdout"
error="/dev/stdout"
checkreturn="true"/>
</target>
<target name="tests">
<phingcall target="unit-tests"/>
</target>
<target name="unit-tests">
<exec command="./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover"
passthru="true"
output="/dev/stdout"
error="/dev/stdout"
checkreturn="true"/>
</target>
<target name="feature-tests">
<phingcall target="set-up-feature-fixtures"/>
<exec command="./vendor/bin/behat --colors"
passthru="true"
output="/dev/stdout"
error="/dev/stdout"
checkreturn="true"/>
</target>
<target name="set-up-feature-fixtures">
<if>
<equals arg1="${fixtures}" arg2="terraform"/>
<then>
<phingcall target="set-up-terraform-feature-fixtures"/>
</then>
<else>
<phingcall target="set-up-wiremock-feature-fixtures"/>
</else>
</if>
</target>
<target name="set-up-terraform-feature-fixtures">
<copy file="features/fixtures/terraform/variables_override.tf.dist"
tofile="features/fixtures/terraform/variables_override.tf.dist"
overwrite="false"/>
<exec command="terraform apply"
dir="features/fixtures/terraform"
passthru="true"
output="/dev/stdout"
error="/dev/stdout"
checkreturn="true"/>
</target>
<target name="tear-down-terraform-feature-fixtures">
<exec command="terraform destroy"
dir="features/fixtures/terraform"
passthru="true"
output="/dev/stdout"
error="/dev/stdout"
checkreturn="true"/>
</target>
<target name="set-up-wiremock-feature-fixtures">
<fail message="TODO: Boot wiremock daemon and set up stubs."/>
</target>
</project>