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, ); });