From f45bea2e04265858f3ae77444a27a746c7c77d0c Mon Sep 17 00:00:00 2001 From: Noel Hidalgo <94735+noneck@users.noreply.github.com> Date: Wed, 1 Jul 2026 11:01:31 -0400 Subject: [PATCH 1/2] ci: add build-only GitHub Actions workflow on Node 20/22 matrix Adds .github/workflows/ci.yml gating on `npm run build` (tsc) across a 20.x/22.x Node matrix, triggered on PRs and pushes to main scoped to TS and package files. Build-only for now: the package has no test script yet. Node 18 is intentionally excluded (EOL 2025-04-30), mirroring the matrix convention already used in the sibling nyc-charter-laws-rules repo. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/ci.yml | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 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..ce07987 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +# Continuous integration for @betanyc/nyc-record-mcp. +# +# Enforces that the TypeScript still compiles (`npm run build` -> `tsc`) on a +# clean, locked install across the ends of the supported Node range. This is +# the build-only gate: the package has no test script yet, so there is nothing +# to run beyond the compile. When a `test` script is added, add a `npm test` +# step here so regressions are caught before merge. +# +# Node matrix: 20.x and 22.x. package.json declares `engines.node ">=18"`, and +# the matrix stays within that floor while using only actively-maintained LTS +# releases. Node 18 reached End-of-Life on 2025-04-30 and is excluded on +# purpose. This mirrors the convention already established in the sibling +# nyc-charter-laws-rules repo, keeping CI consistent across BetaNYC's MCP repos. +# If the engines floor is raised to ">=20" later, drop this note. +# +# Owned by the software-engineer agent per BetaNYC engineering standards. + +name: CI + +on: + pull_request: + branches: [main] + paths: + - "**/*.ts" + - "package.json" + - "package-lock.json" + push: + branches: [main] + paths: + - "**/*.ts" + - "package.json" + - "package-lock.json" + +permissions: + contents: read + +jobs: + build: + name: Build (Node ${{ matrix.node-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: + - "20.x" + - "22.x" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build From a6f98786a2d498c1485e005fd4251709a9178835 Mon Sep 17 00:00:00 2001 From: Noel Hidalgo <94735+noneck@users.noreply.github.com> Date: Wed, 1 Jul 2026 13:19:55 -0400 Subject: [PATCH 2/2] ci: close self-trigger gap and add manual dispatch Add `.github/workflows/**` to the pull_request and push path filters so edits to the workflow itself re-trigger it, and add a permanent `workflow_dispatch` trigger for on-demand re-runs. Without the path addition, the PR that introduces this workflow never fires it (the diff touches only files outside the filter), so the gate was never actually exercised on GitHub Actions. Mirrors the fix landed in nyc-council-mcp PR #6. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce07987..8b22129 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,12 +24,21 @@ on: - "**/*.ts" - "package.json" - "package-lock.json" + - ".github/workflows/**" push: branches: [main] paths: - "**/*.ts" - "package.json" - "package-lock.json" + - ".github/workflows/**" + # Manual trigger — lets us fire a run on any branch. Needed because a + # path-scoped pull_request/push event does not fire on the very PR that + # introduces the workflow, so this gate never executed on its own PR (#3). + # Adding `.github/workflows/**` to the path filters above closes that gap for + # future workflow edits; this dispatch is retained permanently as a low-cost + # affordance for on-demand re-runs. + workflow_dispatch: permissions: contents: read