Skip to content

Instantly share code, notes, and snippets.

@archfizz
Last active December 17, 2015 03:08
Show Gist options
  • Save archfizz/5540784 to your computer and use it in GitHub Desktop.
Save archfizz/5540784 to your computer and use it in GitHub Desktop.
A boilerplate Ant build script for a PHP app using Composer and PHPUnit, ideal for Jenkins CI.
<?xml version="1.0" encoding="UTF-8"?>
<project name="my-project" default="build">
<target name="build" depends="phpunit" />
<target name="composer" description="Installing dependencies with Composer">
<exec executable="wget" failonerror="true">
<arg value="-nc" />
<arg value="http://getcomposer.org/composer.phar" />
</exec>
<echo>---> Installing dependencies with Composer</echo>
<exec executable="php" failonerror="true">
<arg value="composer.phar" />
<arg value="install" />
</exec>
</target>
<target name="phpunit" depends="composer" description="Run unit tests with PHPUnit">
<echo>---> Running Unit Tests with PHPUnit</echo>
<exec executable="phpunit" failonerror="true" />
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment