fix(outbox) : resolve server-only imports in worker
CI / Verify (push) Successful in 1m55s
CI / Build immutable images and deploy (push) Failing after 10m50s

This commit is contained in:
2026-10-09 18:53:24 +07:00 Unverified
parent a04a76fd70
commit 32a71be3e9
3 changed files with 13 additions and 1 deletions
+11
View File
@@ -102,12 +102,23 @@ describe("production deployment contract", () => {
"ENV NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID=${NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID}",
);
expect(dockerfile).toContain("backend/discord.ts");
expect(dockerfile).toMatch(
/bun build scripts\/outbox-worker\.ts[\s\S]*?--conditions=react-server[\s\S]*?--outfile=dist\/outbox-worker\.js/u,
);
expect(dockerfile).toMatch(
/bun build backend\/discord\.ts[\s\S]*?--conditions=react-server[\s\S]*?--outfile=dist\/discord\.js/u,
);
expect(dockerfile).toContain("./worker/discord.js");
});
it("runs the outbox worker with server-only module resolution locally", async () => {
const packageJson = JSON.parse(await repositoryFile("package.json"));
expect(packageJson.scripts["worker:outbox"]).toBe(
"bun --conditions=react-server scripts/outbox-worker.ts",
);
});
it("verifies first, publishes immutable images, and migrates before rollout", async () => {
const workflow = await repositoryFile(".gitea/workflows/ci.yml");