ci(frontend): reuse production build in smoke

This commit is contained in:
cesnimda
2026-08-31 12:11:22 +02:00
parent eca3479059
commit 47e8e3e50e
3 changed files with 29 additions and 14 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ const appUrl = "http://localhost:3300";
const dataRoot = path.join(os.tmpdir(), `jobtracker-e2e-${process.pid}-${Date.now().toString(36)}`);
const reuseServers = process.env.PLAYWRIGHT_REUSE_SERVERS === "true";
const useStaticExport = process.env.PLAYWRIGHT_STATIC_EXPORT === "true";
const usePrebuiltExport = process.env.PLAYWRIGHT_PREBUILT_EXPORT === "true";
const quote = (value: string) => `"${value.replaceAll('"', '\\"')}"`;
const nodeCommand = quote(process.execPath);
const dotnetCommand = quote(process.env.DOTNET_HOST_PATH || "dotnet");
@@ -48,7 +49,7 @@ export default defineConfig({
},
{
command: useStaticExport
? `${nodeCommand} ${nextCommand} build && ${nodeCommand} ${exportServerCommand}`
? `${usePrebuiltExport ? "" : `${nodeCommand} ${nextCommand} build && `}${nodeCommand} ${exportServerCommand}`
: `${nodeCommand} ${nextCommand} dev --webpack --hostname localhost --port 3300`,
url: appUrl,
timeout: 120_000,