mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 03:47:45 +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 15 files changed, 29 insertions(+), 29 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>
79 lines
3.5 KiB
YAML
79 lines
3.5 KiB
YAML
name: CI
|
|
|
|
# The verification that used to live inside the Vercel deploy workflow. It
|
|
# belongs in its own file: prod is self-hosted on bitbaum, so the deploy
|
|
# workflow is now a shim over the shared pipeline — and that pipeline refuses
|
|
# to ship a commit whose CI is not green. Without this file there would be no
|
|
# CI to be green, and every deploy would sail through unverified.
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
# 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:
|
|
name: Format, lint, test, build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: pnpm/action-setup@v6
|
|
|
|
# setup-pnpm's default store nests inside its own bin dir, which breaks
|
|
# any prepare-building dep (portable-type TS2742) — pin it outside.
|
|
- run: pnpm config set store-dir ~/.pnpm-store --global
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version-file: .nvmrc
|
|
cache: pnpm
|
|
|
|
- run: pnpm install --frozen-lockfile
|
|
# Next keeps its compiler output in .next/cache. Without restoring it,
|
|
# every CI run recompiles the whole app from scratch — and the deploy
|
|
# then compiles it a second time. Measured across the fleet on
|
|
# 2026-09-07: of eight repos, exactly one cached this.
|
|
#
|
|
# Keyed on the lockfile so a dependency change invalidates it. The bare
|
|
# restore-key is last on purpose: a stale cache still beats no cache,
|
|
# and Next validates its own entries rather than trusting them.
|
|
- name: Cache Next.js build
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: .next/cache
|
|
key: nextjs-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.sha }}
|
|
restore-keys: |
|
|
nextjs-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}-
|
|
nextjs-${{ runner.os }}-
|
|
|
|
# SSOT: format + lint + typecheck + test + build are bundled in the
|
|
# `verify` script (package.json), and CI calls it verbatim so the
|
|
# gating chain cannot drift from what a developer runs locally. This job
|
|
# was already NAMED verify but re-inlined the chain, which is how the
|
|
# typecheck gate went missing: `tsc --noEmit` ran nowhere, and type
|
|
# errors were caught only as a side effect of `next build`.
|
|
#
|
|
# The `--if-present` flags are gone on purpose. They made three of these
|
|
# gates unable to fail: rename or delete the `lint` script and the step
|
|
# passes green instead of erroring. A gate that cannot go red is not a
|
|
# gate — the same defect that let evig ship 25 failing tests under a ✓.
|
|
- name: Verify (format + lint + typecheck + test + build)
|
|
run: pnpm run verify
|