Skip to content

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

fix(ci): skip tui coverage on pull requests to reduce build time

Steven Enamakel33433f385858
diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjs
index c6e8a19bfe..b6bffce1fe 100644
--- a/scripts/__tests__/self-hosted-lanes.test.mjs
+++ b/scripts/__tests__/self-hosted-lanes.test.mjs
@@ -97,12 +97,13 @@ test("ex63 runs the core's unit tests under nextest; hosted keeps cargo's runner
);
});
-test("doctests and the TinyJuice regression are left to pushes to main", () => {
+test("doctests, tui coverage and the TinyJuice regression are left to pushes to main", () => {
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");
const runs = allRuns(plan).join("\n");
assert.doesNotMatch(runs, /cargo test -p openhuman --doc/);
assert.doesNotMatch(runs, /tool_output_tabulates_a_large_graph/);
diff --git a/scripts/ci/rust-coverage.sh b/scripts/ci/rust-coverage.sh
index 1485c05661..90c133aef0 100755
--- a/scripts/ci/rust-coverage.sh
+++ b/scripts/ci/rust-coverage.sh
@@ -158,7 +158,14 @@ fi
suite "openhuman-embed" llvm_cov_embed --no-report --no-fail-fast -p openhuman-embed --all-targets
suite "openhuman-rpc" llvm_cov_package --no-report --no-fail-fast -p openhuman-rpc --all-targets
suite "openhuman-tinyhumans" llvm_cov_embed --no-report --no-fail-fast -p openhuman-tinyhumans --all-targets
-suite "openhuman-tui" llvm_cov_package --no-report --no-fail-fast -p openhuman-tui --all-targets
+# The terminal frontend builds the core a third time (default features, not the
+# product set), so CI Fast leaves it to pushes to main (OH_COV_TUI=0), where
+# CI Lite runs this script with it on.
+if [ "${OH_COV_TUI:-1}" = "1" ]; then
+ suite "openhuman-tui" llvm_cov_package --no-report --no-fail-fast -p openhuman-tui --all-targets
+else
+ log "skipping openhuman-tui (OH_COV_TUI=${OH_COV_TUI}); pushes to main run it"
+fi
if [ "${OH_COV_RUNNER:-cargo}" = "nextest" ]; then
# Every integration target in one parallel run, one process per test: the
diff --git a/scripts/ci/self-hosted/lanes-plan.mjs b/scripts/ci/self-hosted/lanes-plan.mjs
index eb7cfcfe7b..ac9c076640 100644
--- a/scripts/ci/self-hosted/lanes-plan.mjs
+++ b/scripts/ci/self-hosted/lanes-plan.mjs
@@ -116,9 +116,11 @@ 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) 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).
+ // 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).
/** @type {Lane[]} */
const lanes = [
@@ -274,12 +276,13 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {
name: "rust-core-coverage",
when: core,
needs: ["test-modules"],
- // The doctests run on pushes to main instead (see above).
+ // Doctests and tui coverage run on pushes to main instead (see above).
// 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",
...(ex63 ? { OH_COV_RUNNER: "nextest" } : {}),
},
run: withModules("bash scripts/ci/rust-coverage.sh"),