tip #49: CI: lint + build + prisma validate
This commit is contained in:
1 parent
d7ffbbc0cc
commit
5b18f052dc
2 files changed
+23
No files matched your search
@@ -41,3 +41,4 @@ Going forward, new tips are pushed automatically by the `mc_survival_tips.py` cr
|
||||
- [Tip #46](tips/2026-09-20-046-crafting-ux-crafting-simulator.md) (2026-09-20) — **crafting-ux**: Crafting Simulator
|
||||
- [Tip #47](tips/2026-09-21-047-social-favorites-bookmarks.md) (2026-09-21) — **social**: Favorites / Bookmarks
|
||||
- [Tip #48](tips/2026-09-22-048-a11y-keyboard-navigation-in-the-item-picker.md) (2026-09-22) — **a11y**: Keyboard navigation in the item-picker
|
||||
- [Tip #49](tips/2026-09-23-049-devex-ci-lint-build-prisma-validate.md) (2026-09-23) — **devex**: CI: lint + build + prisma validate
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
tip_number: 49
|
||||
date: 2026-09-23
|
||||
category: devex
|
||||
status: 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
|
||||
|
||||
1. .github/workflows/ci.yml with 3 jobs: lint (npm run lint), build (npm run build), prisma (npx prisma validate).
|
||||
2. Use a Postgres service container in CI if Prisma needs to format/validate against a real DB.
|
||||
3. Cache ~/.npm and node_modules for fast runs.
|
||||
Reference in new issue
Block a user