Skip to content

Commit

Permalink
Adding a seperate build script to compile api docs and run coverage a…
Browse files Browse the repository at this point in the history
…nd other metrics.
  • Loading branch information
wtfzdotnet committed Feb 28, 2014
1 parent 8c3ae4a commit 2c2a12e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/bin
/docs
/build/*
!/build/phpunit.xml
!/build/phpmd.xml
!/build/phpdox.xml
/vendor/
Expand All @@ -10,3 +11,4 @@
/apikey.php
/phpunit
/public_html
/cache.properties
14 changes: 7 additions & 7 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>

<project name="php-tmdb-api" default="build">
<project name="php-tmdb-api" default="build-parallel">
<target name="build"
depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpunit,phpdox"/>

<target name="build-parallel"
depends="prepare,lint,tools-parallel,phpunit"/>
depends="prepare,lint,tools-parallel,phpunit,phpdox"/>

<target name="tools-parallel" description="Run tools in parallel">
<parallel threadCount="2">
<sequential>
<antcall target="pdepend"/>
<antcall target="phpmd-ci"/>
</sequential>
<antcall target="phploc"/>
<antcall target="phpcpd"/>
<antcall target="phpcs-ci"/>
<antcall target="phploc"/>
<!--
<antcall target="phpdox"/>
-->
</parallel>
</target>

Expand Down Expand Up @@ -122,6 +119,9 @@
</target>

<target name="phpunit" description="Run unit tests with PHPUnit">
<exec executable="phpunit" failonerror="true"/>
<exec executable="phpunit" failonerror="true">
<arg value="-c" />
<arg path="${basedir}/build/phpunit.xml" />
</exec>
</target>
</project>
40 changes: 40 additions & 0 deletions build/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="../test/bootstrap.php"
>
<testsuites>
<testsuite name="php-tmdb-api Test Suite">
<directory>../test/Tmdb/</directory>
</testsuite>
</testsuites>

<groups>
<exclude>
<group>functional</group>
</exclude>
</groups>

<filter>
<whitelist>
<directory suffix=".php">../lib/Tmdb/</directory>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="coverage" charset="UTF-8"
yui="true" highlight="true"
lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-clover" target="coverage/xml/index.xml" charset="UTF-8"
yui="true" highlight="true"
lowUpperBound="35" highLowerBound="70"/>
</logging>
</phpunit>
9 changes: 0 additions & 9 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,4 @@
<directory suffix=".php">./lib/Tmdb/</directory>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="build/coverage" charset="UTF-8"
yui="true" highlight="true"
lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-clover" target="build/coverage/xml/index.xml" charset="UTF-8"
yui="true" highlight="true"
lowUpperBound="35" highLowerBound="70"/>
</logging>
</phpunit>

0 comments on commit 2c2a12e

Please sign in to comment.