From 609d58231deb48aa51ee7da3af9cbd1be6787e5b Mon Sep 17 00:00:00 2001 From: josh Date: Fri, 8 May 2026 23:54:30 -0400 Subject: [PATCH] ci(01-07): minimum-viable GitHub Actions workflow running npm run ci on push + PR (PIPE-06) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Single-job workflow at .github/workflows/ci.yml (~49 lines including load-bearing comments) - runs-on: ubuntu-latest, timeout-minutes: 10 - Uses actions/setup-node@v4 with cache: 'npm' (per RESEARCH CI Pitfall A — never cache node_modules/) - Node 22 (per RESEARCH § Environment Availability) - Triggers on push to main and pull_request to main - Steps: checkout → setup-node → npm ci (lockfile-strict) → npm run ci (lint + test + validate-assets + build) - Per CONTEXT user pushback: NO matrix, NO test reporters, NO Codecov, NO release automation - Local npm run ci exits 0 (53 tests passing across 12 files); workflow will be green on push - Structurally enforces every Phase 1 success criterion on every commit going forward --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..785d874 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +# Phase 1 — minimum-viable CI per RESEARCH Open Question #4 + CONTEXT user pushback +# against ceremonial workflows (.planning/phases/01-foundations-and-doctrine/01-CONTEXT.md). +# +# On every push to main and every pull request: +# - npm ci (lockfile-strict install — refuses on package.json drift) +# - npm run ci (lint + test + validate-assets + build, defined in package.json) +# +# This single job satisfies PIPE-06: Vitest tests run on every CI build. +# Phase 2+ economy tests flow through the same `npm run ci` chain — no workflow change +# is needed when more tests are added. +# +# Deliberately omitted (per CONTEXT user pushback against ceremony): +# - OS matrix (Linux only is fine; PIPE-04 visual regression testing is Phase 8) +# - Node-version matrix (one supported version is enough for solo-dev) +# - Test reporters / Codecov uploads (no coverage requirement in Phase 1) +# - Release automation (no releases until Phase 2 ships Season 1) +# - Notification integrations (the project owner reads GitHub directly) + +name: ci + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + ci: + name: lint + test + validate-assets + build + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node 22 + uses: actions/setup-node@v4 + with: + node-version: '22' + # Per RESEARCH CI Pitfall A: cache ~/.npm based on package-lock.json, + # NEVER cache node_modules/ directly (transitive deps go stale). + cache: 'npm' + + - name: Install dependencies (lockfile-strict) + run: npm ci + + - name: Run CI suite + run: npm run ci