mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
ci: Exclude test controller in CI by default (#18136)
This commit is contained in:
@@ -14,6 +14,10 @@ import path from 'path';
|
||||
// Check if running in a CI environment
|
||||
const isCI = process.env.CI === 'true';
|
||||
|
||||
// Check if test controller should be excluded (CI + flag not set)
|
||||
const excludeTestController =
|
||||
process.env.CI === 'true' && process.env.INCLUDE_TEST_CONTROLLER !== 'true';
|
||||
|
||||
// Disable verbose output and force color only if not in CI
|
||||
$.verbose = !isCI;
|
||||
process.env.FORCE_COLOR = isCI ? '0' : '1';
|
||||
@@ -169,6 +173,15 @@ startTimer('package_deploy');
|
||||
|
||||
await fs.ensureDir(config.compiledAppDir);
|
||||
|
||||
if (excludeTestController) {
|
||||
const cliPackagePath = path.join(config.rootDir, 'packages/cli/package.json');
|
||||
const content = await fs.readFile(cliPackagePath, 'utf8');
|
||||
const packageJson = JSON.parse(content);
|
||||
packageJson.files.push('!dist/**/e2e.*');
|
||||
await fs.writeFile(cliPackagePath, JSON.stringify(packageJson, null, 2));
|
||||
echo(chalk.gray(' - Excluded test controller from packages/cli/package.json'));
|
||||
}
|
||||
|
||||
await $`cd ${config.rootDir} && NODE_ENV=production DOCKER_BUILD=true pnpm --filter=n8n --prod --legacy deploy --no-optional ./compiled`;
|
||||
|
||||
const packageDeployTime = getElapsedTime('package_deploy');
|
||||
|
||||
Reference in New Issue
Block a user