fix(deploy): clear EADDRINUSE orphans and update deploy contract tests
CI / check (push) Successful in 23s
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 1m13s

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-30 18:41:26 +02:00
1 parent 540bce911f
commit c433e5a52f
1 file changed
+7 -2
+7 -2
View File
@@ -68,7 +68,10 @@ describe("production deploy workflow", () => {
const stopAt = deployJob.indexOf("pm2 stop next");
const migrateAt = deployJob.indexOf("pnpm db:migrate");
const startLabelAt = deployJob.indexOf("Starting PM2");
const startAt = deployJob.indexOf("pm2 reload next", startLabelAt);
const startAt = deployJob.indexOf(
"pm2 start pnpm --name next -- start",
startLabelAt,
);
expect(buildAt).toBeGreaterThan(-1);
expect(stopAt).toBeGreaterThan(buildAt);
expect(migrateAt).toBeGreaterThan(stopAt);
@@ -103,7 +106,9 @@ describe("production deploy workflow", () => {
it("runs an HTTP health check before declaring deploy success", () => {
expect(workflow).toContain("/api/health");
expect(workflow).toContain('"database":true');
const startAt = deployJob.indexOf("pm2 reload next");
expect(deployJob).toContain("export PORT=");
expect(deployJob).toContain("free_tcp_port");
const startAt = deployJob.indexOf("pm2 start pnpm --name next -- start");
const healthAt = deployJob.indexOf("/api/health");
const successAt = deployJob.indexOf("--- Deployed successfully ---");
expect(startAt).toBeGreaterThan(-1);