Skip to content

Instantly share code, notes, and snippets.

@ggirtsou
Created July 17, 2016 18:35
Show Gist options
  • Save ggirtsou/23e08cf0fd8e3a6e0565ddff2c79a7b4 to your computer and use it in GitHub Desktop.
Save ggirtsou/23e08cf0fd8e3a6e0565ddff2c79a7b4 to your computer and use it in GitHub Desktop.
Sample Apache Ant configuration file
<?xml version="1.0" encoding="UTF-8"?>
<project name="My Project" basedir=".">
<property name="app" location="app" />
<property name="build" location="app/logs/build" />
<delete dir="${build}" />
<echo message="Create build dir"/>
<mkdir dir="${build}" />
<echo message="Drop test database"/>
<exec executable="php" output="app/logs/build/drop.txt">
<arg value="app/console" />
<arg value="doctrine:database:drop" />
<arg value="--no-interaction" />
<arg value="--env=test" />
<arg value="--force" />
</exec>
<echo message="Create test database"/>
<exec executable="php" failonerror="true" output="app/logs/build/create.txt">
<arg value="app/console" />
<arg value="doctrine:database:create" />
<arg value="--no-interaction" />
<arg value="--env=test" />
</exec>
<echo message="Apply db migrations"/>
<exec executable="php" failonerror="true" output="app/logs/build/migrate.txt">
<arg value="app/console" />
<arg value="doctrine:migrations:migrate" />
<arg value="--no-interaction" />
<arg value="--env=test" />
</exec>
<echo message="Clear cache"/>
<exec executable="php" failonerror="true" output="app/logs/build/cache.txt">
<arg value="app/console" />
<arg value="cache:clear" />
<arg value="--no-interaction" />
<arg value="--env=test" />
</exec>
<echo message="Install assets"/>
<exec executable="php" failonerror="true" output="app/logs/build/assets.txt">
<arg value="app/console" />
<arg value="assets:install" />
<arg value="--no-interaction" />
<arg value="--env=test" />
</exec>
<echo message="Load db fixtures"/>
<exec executable="php" failonerror="true" output="app/logs/build/fixtures.txt">
<arg value="app/console" />
<arg value="doctrine:fixtures:load" />
<arg value="--no-interaction" />
<arg value="--env=test" />
</exec>
<echo message="Run siteBundle tests"/>
<exec executable="php" failonerror="true" output="app/logs/build/behat-siteBundle.txt">
<arg value="bin/behat" />
<arg value="--suite=siteBundle" />
</exec>
<echo message="Run Unit tests"/>
<exec executable="/usr/bin/phpunit" failonerror="true" output="app/logs/build/phpunit.txt">
<arg value="-c" />
<arg path="${app}/phpunit.xml.dist" />
<arg value="--testsuite=UnitTests" />
</exec>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment