From 5072d22dbda12a31b15c4a50071fbcf1ee3fdad7 Mon Sep 17 00:00:00 2001 From: Runtime Dev Date: Fri, 27 Nov 2026 04:13:41 +0000 Subject: [PATCH] ci: run the .github/scripts tests in the frontend job The 39 script tests (risk-gate 24, merge-gate 8, risk-gate-label 7) never ran in CI, so they were local-only evidence. The frontend job's single node --test invocation now includes them. An unmatched glob is not a failure for node --test: it reports zero tests and exits 0 (measured on Node 24.22). The ls guard in front of the call makes the step fail if the script tests stop matching, instead of going green. tests/ci_test_list.test.mjs pins that exact run line, so it moves with it. Job names, the required rollup and the permissions are unchanged. Related #3405 --- .github/workflows/tests.yml | 5 ++++- tests/ci_test_list.test.mjs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5bae353ec..41d04e0e8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,10 @@ jobs: - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: '22' - - run: node --test tests/*.test.mjs manager/compose-planner/compose-command-planner.test.js + # The ls guard is not decoration: node --test treats a pattern that matches no file as zero + # tests and exits 0 (measured on Node 24.22), so without it this step would go green if the + # script tests ever disappeared. + - run: ls .github/scripts/*.test.mjs > /dev/null && node --test tests/*.test.mjs .github/scripts/*.test.mjs manager/compose-planner/compose-command-planner.test.js management: name: Management API ยท Python ${{ matrix.python }} diff --git a/tests/ci_test_list.test.mjs b/tests/ci_test_list.test.mjs index 9a8127347..dae4c5cee 100644 --- a/tests/ci_test_list.test.mjs +++ b/tests/ci_test_list.test.mjs @@ -4,10 +4,10 @@ import test from 'node:test'; const workflow = readFileSync(new URL('../.github/workflows/tests.yml', import.meta.url), 'utf8'); -test('CI runs all web tests and the compose planner in one test invocation', () => { +test('CI runs all web tests, the script tests and the compose planner in one test invocation', () => { assert.match( workflow, - /^ {6}- run: node --test tests\/\*\.test\.mjs manager\/compose-planner\/compose-command-planner\.test\.js$/m, + /^ {6}- run: ls \.github\/scripts\/\*\.test\.mjs > \/dev\/null && node --test tests\/\*\.test\.mjs \.github\/scripts\/\*\.test\.mjs manager\/compose-planner\/compose-command-planner\.test\.js$/m, ); });