fix(ci): resolve playwright timeout by pushing db schema#137
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
📝 WalkthroughWalkthroughA "Push database schema" step running ChangesE2E CI Database Schema Push and Test Updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
CI/Build Failures & Fixes Summarysuch table: testimonial and |
Issue Summary: Playwright E2E CI Timeout Fix
1. Problem Description
During continuous integration (CI), the
e2ejob within.github/workflows/ci.ymlconsistently timed out while waiting for the Next.js web server to become healthy:Symptoms
In the web server log output, the following error repeated:
This error occurred during the rendering of the
Testimonialscomponent, which performs a database query on startup.2. Root Cause
TURSO_DATABASE_URLtofile:local.db.local.dbis configured in.gitignore, the SQLite file does not exist when the action checkouts the codebase in the clean runner environment.pnpm dev) and runningpnpm test:e2ewithout initializing the database schema.testimonial, rendering the server unhealthy and causing Playwright to hit its timeout threshold.3. Solution
We inserted a step to initialize/push the database schema using Drizzle Kit right after installing dependencies and before launching Playwright.
Changes Made
In .github/workflows/ci.yml:
Why this works:
pnpm db:push(which maps todrizzle-kit push) reads the activeTURSO_DATABASE_URL(file:local.db) and automatically generates the file and the database schema defined insrc/db/schema.ts.[]of testimonials), allowing the homepage and app path to load and respond with a200 OKstatus, satisfying the Playwright health check.Summary by CodeRabbit