Fix CI FPM worker config test
This commit is contained in:
+10
-1
@@ -128,7 +128,16 @@ tar \
|
||||
-C services/nginx/app -cf - . \
|
||||
| docker compose $compose_files exec -T php1 tar -C /var/www/html -xf -
|
||||
|
||||
docker compose $compose_files exec -T php1 sh -lc 'rm -rf /var/www/repo-root && mkdir -p /var/www/repo-root'
|
||||
tar \
|
||||
-cf - \
|
||||
Dockerfile \
|
||||
Dockerfile.coolify-api \
|
||||
services/php/Dockerfile \
|
||||
services/php/php-fpm-pool.conf \
|
||||
| docker compose $compose_files exec -T php1 tar -C /var/www/repo-root -xf -
|
||||
|
||||
composer_install
|
||||
|
||||
docker compose $compose_files exec -T php1 sh -lc \
|
||||
"cd /var/www/html && composer test:ci:$suite"
|
||||
"cd /var/www/html && PLENO_REPO_ROOT_FOR_TESTS=/var/www/repo-root composer test:ci:$suite"
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
<?php
|
||||
|
||||
function phpFpmWorkerConfigRepoRoot(): string
|
||||
{
|
||||
$configuredRoot = getenv('PLENO_REPO_ROOT_FOR_TESTS');
|
||||
if (is_string($configuredRoot) && $configuredRoot !== '') {
|
||||
return rtrim($configuredRoot, DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
$appRoot = defined('WD') ? WD : dirname(__DIR__, 3);
|
||||
|
||||
return dirname($appRoot, 3);
|
||||
}
|
||||
|
||||
function phpFpmWorkerConfigRepoPath(string $relative): string
|
||||
{
|
||||
$appRoot = defined('WD') ? WD : dirname(__DIR__, 3);
|
||||
|
||||
return dirname($appRoot, 3) . DIRECTORY_SEPARATOR . str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $relative);
|
||||
return phpFpmWorkerConfigRepoRoot() . DIRECTORY_SEPARATOR . str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $relative);
|
||||
}
|
||||
|
||||
function phpFpmWorkerConfigValue(string $poolConfig, string $key): ?int
|
||||
|
||||
Reference in New Issue
Block a user