From 5b18f052dce1f49937c96a402fd9a103359de645 Mon Sep 17 00:00:00 2001 From: Hermes AI Bot Date: Wed, 23 Sep 2026 16:01:16 +0000 Subject: [PATCH] tip #49: CI: lint + build + prisma validate --- TIPS.md | 1 + ...049-devex-ci-lint-build-prisma-validate.md | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tips/2026-09-23-049-devex-ci-lint-build-prisma-validate.md diff --git a/TIPS.md b/TIPS.md index cecf637..7f73f5a 100644 --- a/TIPS.md +++ b/TIPS.md @@ -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 diff --git a/tips/2026-09-23-049-devex-ci-lint-build-prisma-validate.md b/tips/2026-09-23-049-devex-ci-lint-build-prisma-validate.md new file mode 100644 index 0000000..8925104 --- /dev/null +++ b/tips/2026-09-23-049-devex-ci-lint-build-prisma-validate.md @@ -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.