1.1 KiB
1.1 KiB
tip_number, date, category, status
| tip_number | date | category | status |
|---|---|---|---|
| 49 | 2026-09-23 | devex | pending |
Tip #49 — CI: lint + build + prisma validate
Date: 2026-09-23
Category: devex
Source: MC-Survival Wiki Daily Tip (cron @ 18:00 MESZ)
CI: lint + build + prisma validate
Add a GitHub Actions workflow that runs lint, build, and prisma validate on every pull request, with a Postgres service container if the Prisma step needs a real database. It solves the broken-code-merges problem: right now nothing runs on PRs, and the result is that lint errors, type errors, and invalid schema migrations get merged and discovered later. The signal is the cost of broken merges: a single broken main branch blocks every other contributor, which compounds fast. Caching ~/.npm and node_modules keeps the runs under a minute, which is the difference between a CI that engineers respect and one they bypass.
Implementation tips
- .github/workflows/ci.yml with 3 jobs: lint (npm run lint), build (npm run build), prisma (npx prisma validate).
- Use a Postgres service container in CI if Prisma needs to format/validate against a real DB.
- Cache ~/.npm and node_modules for fast runs.