diff --git a/drupalci.yml b/drupalci.yml index 232228cdb25efb40021f8fc990fecc61023515d6..d5d93d9bc9fe2c343e229e59d5dd5c4efb6d3ce3 100644 --- a/drupalci.yml +++ b/drupalci.yml @@ -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' diff --git a/src/ComposerStager/ProcessFactory.php b/src/ComposerStager/ProcessFactory.php index 018040c93ae514b52bcbb82a59b20fe3558fde7f..fec8b8d48a15dfcbeb95705ab5cb8e5f3614b104 100644 --- a/src/ComposerStager/ProcessFactory.php +++ b/src/ComposerStager/ProcessFactory.php @@ -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 diff --git a/src/Updater.php b/src/Updater.php index e13d4bc68c37a8524e80471018e1697b5065f4c0..c19b10ccb6332b958b24f5a6df68c3bf1d390906 100644 --- a/src/Updater.php +++ b/src/Updater.php @@ -259,7 +259,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()); } diff --git a/tests/src/Build/AttendedUpdateTestBase.php b/tests/src/Build/AttendedUpdateTestBase.php index 1f0b3633c825d5e6fec741195bf83d8915b24e6b..1de9ad105c54ecf34fa06a46d1a4d4d3e814d349 100644 --- a/tests/src/Build/AttendedUpdateTestBase.php +++ b/tests/src/Build/AttendedUpdateTestBase.php @@ -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); } /**