From a921b79bb99417ccc506f406d403578a0825ef45 Mon Sep 17 00:00:00 2001 From: Triple7 Date: Sun, 24 May 2026 16:48:53 -0700 Subject: [PATCH] Harden Node 20 CI/deploy reliability checks --- .github/workflows/ci.yml | 4 ++-- .github/workflows/security.yml | 4 ++-- README.md | 4 ++-- spectracleanse-engineering/docs/render-deploy-checklist.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bea58a..1fde9e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - # Vite 4 requires Node 18; if you upgrade to Vite 5 bump this to 20 + # Pinned via .nvmrc; keep CI aligned with production Node 20 baseline. node-version-file: ".nvmrc" cache: "npm" cache-dependency-path: package-lock.json @@ -93,7 +93,7 @@ jobs: env: # Placeholder – real URL is injected at deploy time via Hyperlift env VITE_API_URL: https://spectracleanse.com - run: npx vite build + run: npm run build - name: Upload build artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 3eb2ec0..977dcad 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: "18" + node-version-file: ".nvmrc" cache: "npm" cache-dependency-path: package-lock.json @@ -49,4 +49,4 @@ jobs: format: table exit-code: "1" ignore-unfixed: true - severity: "HIGH,CRITICAL" \ No newline at end of file + severity: "HIGH,CRITICAL" diff --git a/README.md b/README.md index 6082de7..d190158 100644 --- a/README.md +++ b/README.md @@ -60,10 +60,10 @@ Questions, partnerships, or enterprise enquiries: [hello@spectracleanse.com](mai ## Native Node deployment runtime -- Native Render/Node deployments should use **Node 20.20.2** (recommended) or a Node version within the supported engines range: `>=18 <23`. +- Native Render/Node deployments should use **Node 20.20.2** (recommended) or another **Node 20.x** release. - If Render defaults your service to a newer Node release, set `NODE_VERSION=20.20.2` in the service environment. - Node 24 is currently not supported for native installs in validation because `better-sqlite3` native compilation failed under Node 24. -- Docker deployments already pin Node 18 via the repo Dockerfile. +- Docker deployments already pin Node 20 via the repo Dockerfile. --- diff --git a/spectracleanse-engineering/docs/render-deploy-checklist.md b/spectracleanse-engineering/docs/render-deploy-checklist.md index ece8091..e1d333d 100644 --- a/spectracleanse-engineering/docs/render-deploy-checklist.md +++ b/spectracleanse-engineering/docs/render-deploy-checklist.md @@ -19,7 +19,7 @@ This checklist covers both Render (web service) and Spaceship Hyperlift (both do - [ ] Not Node 24 (better-sqlite3 native compilation incompatible) - [ ] Build log confirms `v20.x.x` — not `v18.x.x` or `v24.x.x` -Note: `.github/workflows/ci.yml` uses Node 18 for CI. This diverges from the production pin. Do not use CI's Node version as a guide for the production runtime. +Note: CI workflows should use `.nvmrc` (`20.20.2`) so native modules (for example `better-sqlite3`) are validated on the same major version used in production. ---