Files
ericpapa80 ddd78235da chore: glob root CI file lists instead of hand-editing package.json
New skill helpers and tests were easy to omit from the growing lint/test/pack scripts. Discover them by path so CI stays complete without touching package.json.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-15 11:08:53 +09:00

30 lines
879 B
JavaScript

#!/usr/bin/env node
"use strict";
const path = require("node:path");
const { listNodeTestFiles, listPythonTestJobs, repoRoot } = require("./ci-paths");
const { bashCommand, npmCommand, run, venvPython } = require("./ci-run");
run(npmCommand(), ["run", "prepare:python-test-env"]);
const nodeTests = listNodeTestFiles();
if (nodeTests.length === 0) {
console.error("run-tests: no Node test files found");
process.exit(1);
}
run(process.execPath, ["--test", ...nodeTests]);
const python = venvPython();
for (const job of listPythonTestJobs()) {
console.log(`# python tests: ${job.label}`);
run(python, job.args, {
env: {
PYTHONNOUSERSITE: "1",
PYTHONPATH: job.pythonPath.join(path.delimiter),
},
});
}
run(npmCommand(), ["run", "test", "--workspaces", "--if-present"]);
run(bashCommand(), [path.join(repoRoot, "scripts", "validate-skills.sh")]);