Skip to content

Instantly share code, notes, and snippets.

@marabesi
Created September 30, 2015 01:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save marabesi/b3653f7dd290c6396b2d to your computer and use it in GitHub Desktop.
Simple build file to run with Phing within three targets
<?xml version="1.0" encoding="utf-8"?>
<project name="First Example" description="Clone, phpunit" default="phpunittests">
<property name="appdir" value="."/>
<property name="repodir" value="./app"/>
<property name="testdir" value="./app/tests"/>
<property name="repo" value="https://github.com/marabesi/laravel-pagseguro.git" />
<target name="clone">
<echo msg="Cloning repository ${repo} please wait"/>
<gitclone repository="${repo}" targetPath="${appdir}/app"/>
</target>
<target name="composerupdate" depends="clone">
<composer composer="./composer.phar" command="install">
<arg value="-d"/>
<arg path="${repodir}" />
</composer>
</target>
<target name="phpunittests" depends="clone, composerupdate">
<phpunit pharlocation="${appdir}/phpunit.phar"
codecoverage="false"
bootstrap="${testdir}/bootstrap.php"
haltonfailure="true"
printsummary="true">
<batchtest>
<fileset dir="${testdir}">
<include name="**/*Test.php"/>
</fileset>
</batchtest>
</phpunit>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment