Repository navigation
ci: add a just ci recipe and a pre-push hook that runs it - #314
Conversation
Runs what the repository's CI runs, so a pre-push check can gate on it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A push that only deletes refs carries no commits, and a branch from before the recipe has none to run, which pull request CI still checks. just check installs from the frozen lockfile, as CI does, so a stale lockfile fails here instead of being repaired. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe check recipe now installs dependencies with Bun’s frozen-lockfile mode. The new ci recipe runs checks, tests, an Astro live build, the social-card check, and a Nix dev-shell derivation evaluation. The pre-push hook skips deletion-only pushes and pushes without a ci recipe. Otherwise, it runs just ci directly or through nix develop when flake.nix exists. Merge Risk:
|
Problem
Every repository lands through the kixel.quest merge queue (decision). Until its queue is live, a push should run the repository's checks locally. This repository has no
just cirecipe and no pre-push hook to run one. CI runs lint, type checks, tests, a live build whose social cards it checks, and an evaluation of the dev shell.Approach
Adds
cito the justfile: it depends oncheckandtest, then runs the live Astro build,scripts/check-og.ts, andnix evalof the dev shell for the host's system, as.github/workflows/pr.ymldoes.just checknow installs withbun install --frozen-lockfile, as CI does, so a stale lockfile fails instead of being quietly repaired;just fixstill updates it. It leaves out the pub and watch site builds, which CI does not run.Adds
.githooks/pre-push, a short POSIX script that runsjust ci, insidenix developbecause the repository has a flake. Once kixel-ai/dotfiles#396 lands, dotfiles pointscore.hooksPathat a hook of its own, which runs this file as committed on the default branch (never a branch's copy), then Git LFS's pre-push, so the hook takes effect once this PR merges. It checks the working tree, not the pushed commits. It skips a push that only deletes refs, and a branch whose justfile has nocirecipe yet (one opened before this lands, or a release branch before its next cut), saying so; pull request CI still checks those. The hook says to delete it once this repository's queue is live.Public API impact
None.
Alternatives
Pointing
ciatjust buildwas rejected: it also builds the pub and watch sites, which CI does not.Follow-ups
None.
Validation
quest gate nix develop --command just cipasses locally in 11 seconds. Running.githooks/pre-push origin <url> </dev/nullunderquest gate, as dotfiles' wrapper would, passed again at the reviewed head. Git LFS: no.Models
Size: S
Implementer: Claude Code, claude-sonnet-5-5, unknown
Implementer: Claude Code, claude-opus-5-5, unknown
🤖 Generated with Claude Code
(Written by Sonnet 5.5; updated by Opus 5.5)