Skip to content

Commit d0cc4fc

Browse files
author
Shaw
committed
fix(ci): run benchmark scenarios from benchmark catalog root
1 parent e1b8b95 commit d0cc4fc

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

scripts/run-live-scenarios.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* - LIFEOPS_JUDGE_THRESHOLD: minimum LLM judge score (default 0.8). Forwarded
1919
* to the CLI via LIFEOPS_LIVE_JUDGE_MIN_SCORE.
2020
* - SCENARIO_FILTER: comma-separated scenario IDs (forwards as --scenario).
21+
* - SCENARIO_ROOT: scenario directory, relative to repo root or absolute
22+
* (default: apps/app-lifeops/test/scenarios).
2123
* - SCENARIO_INCLUDE_PENDING=1: include scenarios marked status="pending".
2224
* - SKIP_REASON: required when any scenario is intentionally skipped.
2325
* - REPORT_PATH: where to write the JSON report (default: artifacts/lifeops-scenario-report.json).
@@ -49,6 +51,11 @@ const LIFEOPS_SCENARIO_ROOT = path.join(
4951
"test",
5052
"scenarios",
5153
);
54+
const scenarioRootInput = (process.env.SCENARIO_ROOT ?? "").trim();
55+
const scenarioRoot =
56+
scenarioRootInput.length > 0
57+
? path.resolve(REPO_ROOT, scenarioRootInput)
58+
: LIFEOPS_SCENARIO_ROOT;
5259

5360
if (!existsSync(SCENARIO_CLI)) {
5461
console.error(
@@ -89,7 +96,7 @@ const args = [
8996
"tsx",
9097
SCENARIO_CLI,
9198
"run",
92-
LIFEOPS_SCENARIO_ROOT,
99+
scenarioRoot,
93100
"--report",
94101
reportPath,
95102
...process.argv.slice(2),

scripts/run-scenario-benchmark.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ const runnerEnv = {
8989
...process.env,
9090
ELIZA_LIVE_TEST: "1",
9191
LIFEOPS_JUDGE_THRESHOLD: process.env.LIFEOPS_JUDGE_THRESHOLD ?? "0.8",
92+
SCENARIO_ROOT: "test/scenarios",
9293
SCENARIO_FILTER: scenariosToRun.join(","),
9394
REPORT_PATH: REPORT_JSON,
9495
};

0 commit comments

Comments
 (0)