diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f1ab182 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,62 @@ +name: CI + +on: + push: + branches: + - main + - 'feat/**' + pull_request: + +jobs: + check: + name: Type check + tests + runs-on: ubuntu-latest + steps: + # The build/dev/typecheck setup expects the Nitro renderer SDK to + # live as a sibling of this repo (see CLAUDE.md → Setup walkthrough). + # Mirror that here by checking the client into /Nitro-V3 + # and the renderer into /Nitro_Render_V3. + - name: Checkout Nitro-V3 + uses: actions/checkout@v4 + with: + path: Nitro-V3 + + - name: Checkout Nitro_Render_V3 (sibling) + uses: actions/checkout@v4 + with: + repository: duckietm/Nitro_Render_V3 + path: Nitro_Render_V3 + + - name: Setup Node 22 + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: yarn + cache-dependency-path: | + Nitro-V3/yarn.lock + Nitro_Render_V3/yarn.lock + + # The renderer SDK is consumed via a filesystem symlink in + # node_modules/@nitrots/nitro-renderer; create it explicitly so + # tsgo (TS 7 native preview) can resolve the tsconfig `include` + # entry pointing at the renderer's `src/**/*.ts`. + - name: Symlink renderer into client node_modules + run: | + mkdir -p Nitro-V3/node_modules/@nitrots + ln -sfn ../../../Nitro_Render_V3 Nitro-V3/node_modules/@nitrots/nitro-renderer + + - name: Install renderer SDK deps + working-directory: Nitro_Render_V3 + run: yarn install --frozen-lockfile + + - name: Install client deps + working-directory: Nitro-V3 + run: yarn install --frozen-lockfile + + - name: Type check (tsgo) + working-directory: Nitro-V3 + run: yarn typecheck + + - name: Vitest + working-directory: Nitro-V3 + run: yarn test --run diff --git a/CLAUDE.md b/CLAUDE.md index 63dfff2..6a3981f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -299,7 +299,10 @@ Fix shapes documented; both are reasonable PRs on their own. - **Skip-motivated god-hook splits are fine** — when a hook's actions mutate internal state, document the reason in the commit message and move on rather than forcing a bad split. -- **`yarn test` must stay green** on every commit. Currently 113/113. +- **`yarn test` must stay green** on every commit. Currently 163/163. + The GitHub Actions workflow at `.github/workflows/ci.yml` runs + `yarn typecheck` + `yarn test --run` on every push to `main` / + `feat/**` and on every PR — both must pass. - **Lint baseline**: don't regress. Some pre-existing errors (`FC<{}>`, `IMessageEvent | undefined` redundant union in the local sandbox where the renderer SDK isn't installed) are out of scope here.