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