Skip to content
Snippets Groups Projects
Commit c64f7e04 authored by Ted Bowman's avatar Ted Bowman
Browse files

Issue #3228125 by tedbow, phenaproxima: Ensure build tests run and pass on Drupalci

parent 452e14c4
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
# cspell:disable
build:
assessment:
validate_codebase:
# validate_codebase:
# automatic_updates code quality checking matches that of Drupal core: it is checked by container_command.commit_checks.
testing:
# Run code quality checks.
......@@ -40,14 +40,6 @@ build:
# halt-on-fail can be set on the run_tests tasks in order to fail fast.
# suppress-deprecations is false in order to be alerted to usages of
# deprecated code.
# @todo Uncomment in https://www.drupal.org/i/3228125
# run_tests.build:
# # Limit concurrency due to disk space concerns.
# concurrency: 15
# types: 'PHPUnit-Build'
# testgroups: '--all'
# suppress-deprecations: false
# halt-on-fail: false
run_tests.phpunit:
types: 'PHPUnit-Unit'
testgroups: '--all'
......@@ -58,6 +50,13 @@ build:
testgroups: '--all'
suppress-deprecations: false
halt-on-fail: false
run_tests.build:
# Limit concurrency due to disk space concerns.
concurrency: 15
types: 'PHPUnit-Build'
testgroups: '--all'
suppress-deprecations: false
halt-on-fail: false
run_tests.functional:
types: 'PHPUnit-Functional'
testgroups: '--all'
......
......@@ -20,7 +20,13 @@ final class ProcessFactory implements ProcessFactoryInterface {
public function create(array $command): Process {
try {
if ($this->isComposerCommand($command)) {
return new Process($command, NULL, ['COMPOSER_HOME' => $this->getComposerHomePath()]);
$process = new Process($command, NULL, ['COMPOSER_HOME' => $this->getComposerHomePath()]);
$path = function_exists('apache_getenv') ? apache_getenv('PATH') : getenv('PATH');
$path .= ':' . dirname(PHP_BINARY);
$env = $process->getEnv();
$env['PATH'] = $path;
$process->setEnv($env);
return $process;
}
return new Process($command);
// @codeCoverageIgnore
......
......@@ -265,7 +265,6 @@ class Updater {
* @see \PhpTuf\ComposerStager\Domain\StagerInterface::stage()
*/
protected function stageCommand(array $command): void {
$this->setEnv('PATH', $this->getEnv('PATH') . ":/usr/local/bin");
$this->stager->stage($command, $this->getStageDirectory());
}
......
......@@ -38,9 +38,18 @@ abstract class AttendedUpdateTestBase extends QuickStartTestBase {
* {@inheritdoc}
*/
protected function getPackagePath(array $package): string {
return $package['name'] === 'drupal/core'
? 'core'
: $this->traitGetPackagePath($package);
if ($package['name'] === 'drupal/core') {
return 'core';
}
[$vendor, $name] = explode('/', $package['name']);
// Assume any contributed module is in modules/contrib/$name.
if ($vendor === 'drupal' && $package['type'] === 'drupal-module') {
return implode(DIRECTORY_SEPARATOR, ['modules', 'contrib', $name]);
}
return $this->traitGetPackagePath($package);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment