- #PHP RUNNER AND PHP VERSION INSTALL#
- #PHP RUNNER AND PHP VERSION FULL#
- #PHP RUNNER AND PHP VERSION SOFTWARE#
To run unit tests, all we have to do is specify the path to our unit tests (but don’t worry, we can also tweak PHPUnit parameters): A build step using this runner will use a PHPUnit executable available on the build agent if specified, or automatically download the latest phpunit.phar from the website during the build. The PHPUnit runner allows running PHPUnit tests during the build and will optionally publish code coverage results to TeamCity.
In the PHP world we typically use PHPUnit for this.
#PHP RUNNER AND PHP VERSION SOFTWARE#
Since a big part of Continuous Integration is making sure the quality of our software is high, running unit tests is typically part of a build configuration. Once this is done, the TeamCity server will list these new meta-runners under the administration page for the project in which the meta runners have been installed: Installing meta runnersĪfter downloading the PHP meta-runners from GitHub, all files named MRPP PHP.xml should be copied into the /projects//pluginData/metaRunners/ directory on our TeamCity server.
#PHP RUNNER AND PHP VERSION FULL#
The Phing, PHPUnit and Composer meta runners will automatically download the latest versions of the executables during the build! Full documentation for these PHP meta runners is available on GitHub. There is only one requirement: a PHP runtime should be installed on our build agent.
#PHP RUNNER AND PHP VERSION INSTALL#
In other words, they allow us to make several build steps easier. Meta runners allow us to reuse build steps by representing them as a native TeamCity runner. TeamCity developers never seem to sleep: with TeamCity 8 a new feature called meta-runners was introduced.
A while ago we blogged about using TeamCity to do Continuous Integration for PHP. Throw new \pakeException("Configuration file is not found: ". Pake_echo_comment('Loading configuration…') Public static function run_app($task, $args) Public static function render(Runner $runner)Įcho $runner->output->yellow->render('Usage:') Įcho $runner->output->render(' phake ') Įcho $runner->output->yellow->render('Options:') Įcho $runner->output->render(' -h, -help Show help text and exit.') Įcho $runner->output->render(' -v, -version Show version information and exit.') Įcho $runner->output->render(' -q, -quiet Hide output from scripts run by tasks.') Įcho $runner->output->render(' -d, -dir Specify a custom working directory.') Įcho $runner->output->render(' -f, -phakefile Specify a custom Phakefile.') Įcho $runner->output->render(' -t, -tasks List all tasks defined in the Phakefile and exit.') Įcho $runner->output->render(' -g, -groups List all groups defined in the Phakefile and exit.') Įcho $runner->output->yellow->render('Tasks:') Įcho $runner->output->yellow->render('Groups:')