Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

ci: run tui tests on pull requests

Steven Enamakel9c577039a3a3
diff --git a/.github/ci-paths-filter.yml b/.github/ci-paths-filter.yml
index 3a2c5ea41d..8583280bb4 100644
--- a/.github/ci-paths-filter.yml
+++ b/.github/ci-paths-filter.yml
@@ -84,6 +84,8 @@ rust-core:
- 'crates/openhuman-core/**'
- 'crates/openhuman-embed/**'
- 'crates/openhuman-tinyhumans/**'
+ - 'crates/openhuman-rpc/**'
+ - 'crates/openhuman-cli/**'
- 'crates/openhuman-tui/**'
- 'Cargo.lock'
- 'build.rs'
diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjs
index bb06b64c59..81b950b9b6 100644
--- a/scripts/__tests__/self-hosted-lanes.test.mjs
+++ b/scripts/__tests__/self-hosted-lanes.test.mjs
@@ -155,13 +155,13 @@ test("a core-only change still installs the node deps rust-core-coverage's mock
assert.deepEqual(orderProblems(sub), []);
});
-test("doctests, tui coverage and module-gated tests are outside the PR lane", () => {
+test("doctests and module-gated tests are outside the PR lane, tui tests run on PRs", () => {
for (const plan of plans()) {
const cov = plan.lanes
.find((l) => l.name === "rust-cov")
.checks.find((c) => c.name === "rust-core-coverage");
assert.equal(cov.env.OH_COV_DOCTESTS, "0");
- assert.equal(cov.env.OH_COV_TUI, "0");
+ assert.equal(cov.env.OH_COV_TUI, "1");
const runs = allRuns(plan).join("\n");
assert.doesNotMatch(runs, /cargo test -p openhuman --doc/);
assert.doesNotMatch(runs, /cargo test -p openhuman-(embed|tinyhumans)\b/);
@@ -559,3 +559,11 @@ test("peak RSS follows the process tree, including setsid'd descendants", () =>
fs.rmSync(dir, { recursive: true, force: true });
}
});
+
+test("the rust-core path filter arms the lane for every crate the tui depends on", () => {
+ const filter = readFileSync(".github/ci-paths-filter.yml", "utf8");
+ const block = filter.split(/^rust-tauri:/m)[0].split(/^rust-core:/m)[1];
+ for (const crate of ["core", "embed", "tinyhumans", "rpc", "cli", "tui"]) {
+ assert.ok(block.includes(`'crates/openhuman-${crate}/**'`), crate);
+ }
+});
diff --git a/scripts/ci/self-hosted/lanes-plan.mjs b/scripts/ci/self-hosted/lanes-plan.mjs
index 22eb4172a5..7493ab4500 100644
--- a/scripts/ci/self-hosted/lanes-plan.mjs
+++ b/scripts/ci/self-hosted/lanes-plan.mjs
@@ -121,11 +121,12 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {
`set -a && . ${modulesEnvFile} && set +a && ${cmd}`;
// Not run on pull requests: the core doctests (an uninstrumented core build
- // of their own), openhuman-tui's coverage (a core build with default
- // features, just for it) and the TinyJuice host-module regression (one test
- // against the downloaded module). CI Lite runs all three on every push to
- // `main` that touches the Rust core (rust-coverage.sh and its
- // rust-core-coverage job).
+ // of their own) and the TinyJuice host-module regression (one test against
+ // the downloaded module). CI Lite runs both on every push to `main` that
+ // touches the Rust core (rust-coverage.sh and its rust-core-coverage job).
+ // openhuman-tui's tests DO run on pull requests: the rust-core path filter
+ // arms this job for any change under core, embed, tinyhumans, rpc, cli or
+ // tui, which is every crate the TUI depends on.
//
// Also left to those pushes, as duplicates of what runs here:
// - `cargo test -p openhuman-embed` / `-p openhuman-tinyhumans` (default
@@ -329,13 +330,14 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {
"test-modules",
ex63 ? "frontend:pnpm-install" : "pnpm-install",
],
- // Doctests and tui coverage run on pushes to main instead (see above).
+ // Doctests run on pushes to main instead (see above); the tui suite
+ // runs here (OH_COV_TUI=1).
// ex63: the core's unit tests run under cargo-nextest, one process
// per test and in parallel (the guest image ships cargo-nextest).
env: {
OUT: "ci-out/lcov/lcov-core.info",
OH_COV_DOCTESTS: "0",
- OH_COV_TUI: "0",
+ OH_COV_TUI: "1",
...(ex63 ? { OH_COV_RUNNER: "nextest" } : {}),
},
run: withModules("bash scripts/ci/rust-coverage.sh"),