ci: build and test workflow - #46
Open
amal66 wants to merge 1 commit into
Open
Conversation
Adds .github/workflows/ci.yml with three jobs adapted from the amal66/mike fork's CI to this repository's backend/ + frontend/ layout: - backend: npm ci, npm test --if-present, npm run build (tsc) - frontend: npm ci, npm test --if-present - evals: runs evals/run.mjs --threshold 1.0 only if the file exists Test steps no-op gracefully on a tree without a test script or evals/, so the workflow is safe to merge before or after the test-harness and evals PRs while still gating the backend build on every PR. Triggers are scoped to push/pull_request on main only (matching the fork's own CI scoping), so feature-branch pushes do not spawn runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CEguyEgXa9JjCciXCcVemC
This was referenced Jul 17, 2026
Closed
willchen96
pushed a commit
to Open-Legal-Products/mike
that referenced
this pull request
Jul 22, 2026
Ported from amal66#46 onto current main, extended for this tree: backend job runs npm ci, tests (--if-present, so it is safe to merge in any order relative to the test-harness PR) and tsc build; frontend job runs tests, eslint as an advisory step (main currently carries 23 lint errors — flip to blocking once burned down), and a production next build with placeholder NEXT_PUBLIC_* env (verified locally that the build succeeds and contacts nothing); evals job runs node evals/run.mjs when present, else skips. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
eliziff
pushed a commit
to eliziff/Beaver
that referenced
this pull request
Jul 29, 2026
Ported from amal66/mike#46 onto current main, extended for this tree: backend job runs npm ci, tests (--if-present, so it is safe to merge in any order relative to the test-harness PR) and tsc build; frontend job runs tests, eslint as an advisory step (main currently carries 23 lint errors — flip to blocking once burned down), and a production next build with placeholder NEXT_PUBLIC_* env (verified locally that the build succeeds and contacts nothing); evals job runs node evals/run.mjs when present, else skips. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
duncanmcqueen
pushed a commit
to duncanmcqueen/mike
that referenced
this pull request
Aug 3, 2026
Ported from amal66#46 onto current main, extended for this tree: backend job runs npm ci, tests (--if-present, so it is safe to merge in any order relative to the test-harness PR) and tsc build; frontend job runs tests, eslint as an advisory step (main currently carries 23 lint errors — flip to blocking once burned down), and a production next build with placeholder NEXT_PUBLIC_* env (verified locally that the build succeeds and contacts nothing); evals job runs node evals/run.mjs when present, else skips. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
.github/workflows/ci.yml— a GitHub Actions workflow adapted from the fork's CI to this repository'sbackend/+frontend/layout. It gates every PR on the backend build today, and its test steps are written to no-op gracefully when the test script or eval harness is absent, so it is safe to merge before or after the test-harness (#43-style) and evals (#45) PRs and starts enforcing them automatically once they land.Changes
One file, three jobs:
npm ci,npm test --if-present,npm run build(tsc), with npm cache keyed onbackend/package-lock.jsonnpm ci,npm test --if-presentnode evals/run.mjs --threshold 1.0onlyif [ -f evals/run.mjs ], otherwise prints a skip noticeTriggers:
push/pull_requestonmainonly — this matches the fork CI's own scoping exactly, and it means pushing feature branches (including this one) spawns no Actions runs.Adaptations from the fork's
ci.yml(monorepo) to this layout, each flagged:npm ci(working-directory: .) → per-packagenpm ciinbackend//frontend/(no root workspace here)npm run test:coverage→npm test --if-present(no coverage ratchet or test script exists here yet;--if-presentmakes the step merge-order-safe)node evals/run.mjs --threshold 1.0→ the same command behind a file-existence guardactions/checkout@v4,actions/setup-node@v4withnode-version: 22+ npm caching, job structure, and the evals job's explanatory commentFork jobs deliberately not ported (they depend on rungs that haven't merged or on fork-only infrastructure), noted here as future additions once their pieces land:
npm audit --audit-level=highand the built-app smoke import (backenddist/index.jsstarts a server on import), lint +next buildfor the web app, monorepo package typecheck/test jobs, python-sdk, Supabase migration validation + deploy jobs, and the separatee2e.ymlPlaywright workflow (needs the fork's full demo stack).Why
The extraction ladder ships tests (vitest harness, evals); without CI they are advisory. This workflow makes them enforceable: the backend build gates PRs immediately, and the test/eval steps switch on automatically as those PRs merge — no follow-up CI edit needed.
Testing
No
actionlintwas available locally (checked brew and npx); instead:yamlnpm package vianode -e(parse OK; verifiedon:triggers, all three jobs, step shapes, working directories)npm ci+npm test --if-present(no-ops, exit 0) +npm run build(tsc, green); frontendnpm ci+npm test --if-present(no-ops, exit 0)evals/absent it prints the skip notice and exits 0; withevals/present (checked out from the evals PR branch) it runs the harness and exits 0Provenance
All lines are mechanical ports of amal66/mike@origin/main (commit b3166dd); exceptions: the layout adaptations flagged above (per-package
npm ci,npm test --if-presentin place oftest:coverage, theif [ -f evals/run.mjs ]guard and its skip message, and the header/step comments describing this adaptation). No new jobs, actions, or logic beyond what the fork'sci.ymlcontains.🤖 Generated with Claude Code
https://claude.ai/code/session_01CEguyEgXa9JjCciXCcVemC