mirror of
https://github.com/bitbaum/datacat.git
synced 2026-12-04 06:08:05 +01:00
The product was renamed on 2026-09-14: bitbaum/loki, loki.orangecat.ch, LOKI_* env keys, loki-* units. This repo referenced the old name in 4 files changed, 6 insertions(+), 6 deletions(-). Email addresses at the old sending domain stay until the new domain is verified in Resend. Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
89 lines
3.9 KiB
YAML
89 lines
3.9 KiB
YAML
# Golden CI floor — see dotfiles/templates/ci/README.md.
|
|
# datacat: pnpm monorepo (frontend/ + backend/, separate installs). The only
|
|
# tests are full-stack Playwright e2e that need both servers + a DB running —
|
|
# NOT hermetic, so they are deferred to a future e2e job (lift revampit's
|
|
# e2e-local pattern once a seeded DB service is wired). This floor gates the
|
|
# frontend quality signals that currently never run: lint, typecheck, build
|
|
# (contentlayer + prisma generate + next build). npm needed --legacy-peer-deps
|
|
# here; pnpm treats peer conflicts as warnings, so no flag is required. The
|
|
# production Docker deploy stays disabled — enabling a deploy is an
|
|
# outward-facing decision, not part of the CI floor.
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
# On a branch the newest push is the only one that matters, so cancel the rest.
|
|
#
|
|
# On main the group is keyed per COMMIT. A commit cancelling a DIFFERENT
|
|
# commit's run breaks deployment, because every deploy path keys off that run:
|
|
# one that waits for CI to pass on the commit finds a cancelled run and stops,
|
|
# and one chained on `workflow_run` sees conclusion=cancelled and skips.
|
|
# auto-merge also re-arms CI with a dispatch, which under a single
|
|
# group-per-branch cancels the push run for the SAME commit.
|
|
#
|
|
# Measured 2026-09-11 across the fleet: 28 of 39 ci.yml files had this shape.
|
|
# loki stranded four merges silently (main green, nothing red, the box
|
|
# serving the previous build); hirnli failed its deploy loudly at the wait step.
|
|
concurrency:
|
|
group: ci-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || 'branch' }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
verify-frontend:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
# pnpm before setup-node so `cache: pnpm` can find the store.
|
|
- uses: pnpm/action-setup@v6
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version-file: .nvmrc
|
|
cache: pnpm
|
|
cache-dependency-path: |
|
|
frontend/pnpm-lock.yaml
|
|
backend/pnpm-lock.yaml
|
|
|
|
- name: Install (frontend)
|
|
working-directory: frontend
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
# backend/ has its own lockfile and, as of this commit, its own tests.
|
|
# Without this step `pnpm run verify` fails at `test:backend` with
|
|
# "Command vitest not found" — the script would be wired and the gate
|
|
# would be red, which is worse than the gate that was simply absent.
|
|
- name: Install (backend)
|
|
working-directory: backend
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
# SSOT: one definition of "verified" lives in the ROOT package.json
|
|
# `verify` (format + lint + typecheck + test + build), run identically
|
|
# here and locally. Runs from repo root — the scripts cd into the
|
|
# workspace they need.
|
|
#
|
|
# `test` covers BOTH halves as of this commit. backend/ previously had a
|
|
# `test` script that was `echo "Error: no test specified" && exit 1`, and
|
|
# the root `test` only ran the frontend — so backend/utils/
|
|
# responseHandlers.test.js sat committed and executed by nothing, which
|
|
# its own docstring pointed out.
|
|
#
|
|
# Build is IN the gate as of 2026-08-04. It was deferred on a prisma-engine
|
|
# issue, and the cost of that gap was exact: contentlayer 0.3.1 reaches into
|
|
# a React internal that React 19 removed, so `/blog/[slug]` threw
|
|
# "d.getOwner is not a function" during prerender. lint and typecheck were
|
|
# both green — only a build could have caught it. The breakage sat on main
|
|
# while every CI run reported success.
|
|
- name: Verify
|
|
run: pnpm run verify
|
|
|
|
# The full-stack Playwright e2e is still DEFERRED, not skipped silently:
|
|
# it needs both servers plus a seeded DB (lift revampit's e2e-local pattern
|
|
# from dotfiles/templates/ci/README.md once that is wired).
|