feat(ci): последовательный deploy IFT -> E2E -> stage -> E2E.
Stage деплоится только после полного UI-сьюта на IFT; после stage — E2E на stage (ift-ui/stage-ui + smoke). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+31
-14
@@ -2,6 +2,13 @@ import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
const port = Number(process.env.E2E_PORT || 4173);
|
||||
const baseURL = process.env.E2E_BASE_URL || `http://127.0.0.1:${port}`;
|
||||
const iftBaseURL = process.env.E2E_IFT_BASE_URL || 'https://admin-ui.ift.eventhub.local';
|
||||
const stageBaseURL = process.env.E2E_STAGE_BASE_URL || 'https://admin-ui.stage.eventhub.local';
|
||||
const liveTarget = process.env.E2E_TARGET;
|
||||
const liveChrome = {
|
||||
...devices['Desktop Chrome'],
|
||||
ignoreHTTPSErrors: true,
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e/tests',
|
||||
@@ -23,23 +30,33 @@ export default defineConfig({
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
testIgnore: /ift\//,
|
||||
},
|
||||
{
|
||||
name: 'ift-ui',
|
||||
use: { ...liveChrome, baseURL: iftBaseURL },
|
||||
testIgnore: /ift\//,
|
||||
},
|
||||
{
|
||||
name: 'ift-smoke',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
baseURL: process.env.E2E_IFT_BASE_URL || 'https://admin-ui.ift.eventhub.local',
|
||||
ignoreHTTPSErrors: true,
|
||||
},
|
||||
use: { ...liveChrome, baseURL: iftBaseURL },
|
||||
testMatch: /ift\//,
|
||||
},
|
||||
{
|
||||
name: 'stage-ui',
|
||||
use: { ...liveChrome, baseURL: stageBaseURL },
|
||||
testIgnore: /ift\//,
|
||||
},
|
||||
{
|
||||
name: 'stage-smoke',
|
||||
use: { ...liveChrome, baseURL: stageBaseURL },
|
||||
testMatch: /ift\//,
|
||||
},
|
||||
],
|
||||
webServer:
|
||||
process.env.E2E_TARGET === 'ift'
|
||||
? undefined
|
||||
: {
|
||||
command: `npm run preview -- --host 127.0.0.1 --port ${port}`,
|
||||
url: baseURL,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 120_000,
|
||||
},
|
||||
webServer: liveTarget
|
||||
? undefined
|
||||
: {
|
||||
command: `npm run preview -- --host 127.0.0.1 --port ${port}`,
|
||||
url: baseURL,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 120_000,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user