smoke tests
Some checks failed
Build & Deploy KLZ Cables / build-and-deploy (push) Failing after 4m17s

This commit is contained in:
2026-01-28 21:39:16 +01:00
parent a85fe64ccb
commit 3f0858a1ba
3 changed files with 59 additions and 1 deletions

View File

@@ -37,6 +37,13 @@ RUN npx tsx scripts/validate-env.ts
RUN npm run build
# Smoke test during build to catch runtime errors early
# We start the app in the background, wait for it to be ready, and run the smoke test
RUN (node .next/standalone/server.js &) && \
npx wait-on -t 30000 http://localhost:3000/health && \
npx tsx scripts/smoke-test.ts http://localhost:3000/health && \
pkill -f "node .next/standalone/server.js"
# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app