forked from NatLibFi/RecordManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
37 lines (32 loc) · 1.7 KB
/
build.xml
File metadata and controls
37 lines (32 loc) · 1.7 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"?>
<project name="RecordManager" basedir="." default="main">
<property name="tmp" value="/tmp" />
<property name="package" value="${phing.project.name}" override="true" />
<property name="builddir" value="${tmp}/build/${phing.project.name}" override="true" />
<property name="srcdir" value="${project.basedir}" override="true" />
<property name="php-cs-fixer-extra-params" value=""/>
<!-- Main Target -->
<target name="main" description="main target">
</target>
<!-- Continuous Integration Tasks -->
<target name="ci-tasks" description="continuous integration tasks">
<phingcall target="phpunit"/>
<phingcall target="phpcs"/>
<phingcall target="php-cs-fixer-dryrun"/>
</target>
<!-- PHPUnit -->
<target name="phpunit" description="Run tests">
<exec command="${srcdir}/vendor/bin/phpunit -dzend.enable_gc=0 -c ${srcdir}/tests/phpunit.xml ${srcdir}/tests" passthru="true" checkreturn="true" />
</target>
<!-- PHP CodeSniffer -->
<target name="phpcs">
<exec command="${srcdir}/vendor/bin/phpcs --standard=PEAR --extensions=php *.php ${srcdir}/src/RecordManager" escape="false" passthru="true" checkreturn="true" />
</target>
<!-- php-cs-fixer (first task applies fixes, second task simply checks if they are needed) -->
<target name="php-cs-fixer">
<exec command="${srcdir}/vendor/bin/php-cs-fixer fix --config=${srcdir}/tests/recordmanager.php_cs -vvv" passthru="true" escape="false" />
</target>
<target name="php-cs-fixer-dryrun">
<exec command="${srcdir}/vendor/bin/php-cs-fixer fix --config=${srcdir}/tests/recordmanager.php_cs -vvv --dry-run --diff" passthru="true" escape="false" checkreturn="true" />
</target>
</project>