diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14e6d4d3..44175765 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,11 @@ on: - 'component/**' - 'connection/**' - 'cli/**' + # Root-level code the lint job actually covers. Without these, a change + # confined to scripts/ skipped CI entirely while still being lintable + # code — and scripts/ holds the predev/prebuild import generators (#1263). + - 'scripts/**' + - 'eslint.config.js' - 'sonar-project.properties' - 'Dockerfile' - '.github/workflows/ci.yml' @@ -20,6 +25,11 @@ on: - 'component/**' - 'connection/**' - 'cli/**' + # Root-level code the lint job actually covers. Without these, a change + # confined to scripts/ skipped CI entirely while still being lintable + # code — and scripts/ holds the predev/prebuild import generators (#1263). + - 'scripts/**' + - 'eslint.config.js' - 'sonar-project.properties' - 'Dockerfile' - '.github/workflows/ci.yml' @@ -84,6 +94,14 @@ jobs: - name: Lint all packages run: npm run lint + # scripts/__tests__ was previously run by NO workflow (#1263) — 71 tests + # covering, among other things, the plugin/connector import generators + # that run as predev/prebuild. A break there stops every dev and build. + # Runs here rather than in unit-tests to keep it off the oversubscribed + # four-package runner (#1240). + - name: Test root scripts + run: npm run test:scripts + # ── Job 1: Unit & integration tests with coverage ────────────────────────── # All three packages run in parallel within a single job. # Connection integration tests use GitHub service containers. diff --git a/package.json b/package.json index dde5d68d..baaabc55 100644 --- a/package.json +++ b/package.json @@ -35,10 +35,11 @@ "dev:enterprise": "bash scripts/setup-enterprise.sh && npm run dev", "prepare": "husky", "postinstall": "[ -n \"$CI\" ] || [ ! -d \"cli/src\" ] || (npm -w cli run build && npm link ./cli)", - "verify": "npm run typecheck && npm run lint && npm run test", + "verify": "npm run typecheck && npm run lint && npm run test && npm run test:scripts", "typecheck": "npm -w component exec tsc -- --noEmit && npm -w app exec tsc -- --noEmit", "sonar:local": "node scripts/sonar-local.mjs", - "review:local": "coderabbit review --base release/1.4 --committed -c CLAUDE.md -c .coderabbit.yaml" + "review:local": "coderabbit review --base release/1.4 --committed -c CLAUDE.md -c .coderabbit.yaml", + "test:scripts": "vitest run scripts/__tests__ --exclude '**/.claude/**' && node --test 'scripts/__tests__/*.node-test.mjs'" }, "lint-staged": { "app/**/*.{ts,tsx}": [ diff --git a/scripts/__tests__/generate-plugin-imports.test.mjs b/scripts/__tests__/generate-plugin-imports.node-test.mjs similarity index 100% rename from scripts/__tests__/generate-plugin-imports.test.mjs rename to scripts/__tests__/generate-plugin-imports.node-test.mjs diff --git a/scripts/__tests__/setup-enterprise.test.mjs b/scripts/__tests__/setup-enterprise.node-test.mjs similarity index 100% rename from scripts/__tests__/setup-enterprise.test.mjs rename to scripts/__tests__/setup-enterprise.node-test.mjs