I've successfully installed PHPCI on my local server, setup a project, and run my first build.
Even without a phpci.yml, PHP CI seems to detect my Codeception tests (yay!)
However, the build log contains the following text
Exception: Warning: file_get_contents(/tests/_output/report.tap.log): failed to open stream: No such file or directory in /path/to/Sites/php-ci/phpci/PHPCI/Plugin/Codeception.php line 94 PLUGIN: FAILED
When I take a look at line 94, I see the following
$tapString = file_get_contents(
$this->phpci->buildPath . $this->logPath . DIRECTORY_SEPARATOR . 'report.tap.log'
);
PHPCI seems to be building a path with the $this->phpci->buildPath
.
What is this path? Is it the PHP CI path? The path of my repository? A third working area that can be anywhere?
Where in PHP CI do I set this path? Per project in the phpci.yml
? Somewhere in the admin?
I've found your question on my search for answers regarding PHPCI.
I don't know if you still need your answer, but I'll post it for anyone else who's wondering.
To answer your questions:
"Where in PHP CI do I set this path?"
Well, to answer that I dug deeper into their source code and I found, that the original path is set up by the following PHP Code:
$buildDirectory = $this->getId() . '_' . substr(md5(microtime(true)), 0, 5);
$this->currentBuildPath = PHPCI_BUILD_ROOT_DIR . $buildDirectory . DIRECTORY_SEPARATOR;
The generated path would therefore be the builds' ID and a (more or less) unique part. Important here is the defined constant PHPCI_BUILD_ROOT_DIR
which is defined in the file vars.php
in your installation directory:
// Define PHPCI_BUILD_ROOT_DIR
if (!defined('PHPCI_BUILD_ROOT_DIR')) {
define('PHPCI_BUILD_ROOT_DIR', PHPCI_DIR . 'PHPCI/build/');
}
So the directory would by default be a temporary folder calledpath/to/phpci/PHPCI/build/4_31370/
This folder will of course be deleted again, as soon as the build is finished.
I've then changed the definition of the folder todefine('PHPCI_BUILD_ROOT_DIR', PHPCI_DIR . 'tempbuilddir/');
which gives me the following build temporary build directory:path/to/phpci/tempbuilddir/6_65873/
So this directory is completely customizable.
Nevertheless the Codeception plugin seems to have changed since your version, as the filename report.tap.log
doesn't appear to be in the source code anymore.
I hope this answer gave you an understanding of the PHPCI build directory configuration. It certainly helped me to find this out.