This repository was archived by the owner on Jul 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.xml
More file actions
47 lines (38 loc) · 1.9 KB
/
build.xml
File metadata and controls
47 lines (38 loc) · 1.9 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Set some basic project information and targets -->
<project name="HRPHP Portal" default="build" basedir=".">
<target name="build"
depends="prepare, phpcs, phpunit-unit" />
<target name="build-full"
depends="prepare, phpcs, phpunit-all" />
<property name="bin.dir" value="${project.basedir}/vendor/bin" override="true" />
<property name="reports.dir" value="${project.basedir}/reports" override="true" />
<!-- Clean up from previous builds -->
<target name="clean" description="Cleanup build artifacts">
<delete dir="${reports.dir}/coverage" />
<delete dir="${reports.dir}/logs" />
</target>
<!-- Prepare for the new build -->
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${reports.dir}/coverage" />
<mkdir dir="${reports.dir}/logs" />
</target>
<!-- PHP Code Sniffer -->
<target name="phpcs" description="Check code style with PHP Code Sniffer">
<echo msg="Checking code against PSR2 standard..." />
<exec command="${bin.dir}/phpcs -v --standard=PSR2 --extensions=php --ignore=*/config/* module/Application/src > ${reports.dir}/logs/phpcs.log"
checkreturn="true" />
</target>
<!-- PHPUnit: Unit Tests -->
<target name="phpunit-unit" description="Run unit tests with PHPUnit">
<echo msg="Running only unit tests in test suite..." />
<exec command="${bin.dir}/phpunit --exclude-group=integration --coverage-clover=coverage.clover"
checkreturn="true" />
</target>
<!-- PHPUnit: All Tests -->
<target name="phpunit-all" description="Run integration tests with PHPUnit">
<echo msg="Running all tests in test suite..." />
<exec command="${bin.dir}/phpunit --coverage-clover=coverage.clover"
checkreturn="true" />
</target>
</project>