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 1
Expand file tree
/
Copy pathbuild.xml
More file actions
37 lines (30 loc) · 1.44 KB
/
build.xml
File metadata and controls
37 lines (30 loc) · 1.44 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Set some basic project information and targets -->
<project name="HRPHP Twitter" default="build" basedir=".">
<target name="build"
depends="prepare, phpcs, phpunit" />
<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 --standard=PSR2 --extensions=php --ignore=*/config/* src > ${reports.dir}/logs/phpcs.log"
checkreturn="true" />
</target>
<!-- PHPUnit -->
<target name="phpunit" description="Run unit tests with PHPUnit">
<echo msg="Running tests in test suite..." />
<exec command="${bin.dir}/phpunit --coverage-clover=coverage.clover"
checkreturn="true" />
</target>
</project>