ci(core): Extract local e2e run script (no-changelog) (#7551)

Github issue / Community forum post (link here to close automatically):

---------

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
OlegIvaniv
2023-10-30 11:18:51 +01:00
committed by GitHub
parent bfa28b9532
commit 3ab04e4f9e
3 changed files with 74 additions and 9 deletions

View File

@@ -1,19 +1,14 @@
import convict from 'convict';
import dotenv from 'dotenv';
import { tmpdir } from 'os';
import { mkdirSync, mkdtempSync, readFileSync } from 'fs';
import { join } from 'path';
import { readFileSync } from 'fs';
import { setGlobalState } from 'n8n-workflow';
import { schema } from './schema';
import { inTest, inE2ETests } from '@/constants';
if (inE2ETests) {
const testsDir = join(tmpdir(), 'n8n-e2e/');
mkdirSync(testsDir, { recursive: true });
// Skip loading config from env variables in end-to-end tests
process.env = {
E2E_TESTS: 'true',
N8N_USER_FOLDER: mkdtempSync(testsDir),
EXECUTIONS_PROCESS: 'main',
N8N_DIAGNOSTICS_ENABLED: 'false',
N8N_PUBLIC_API_DISABLED: 'true',