Skip to content

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

feat(ci): add nextest runner support to coverage script

Steven Enamakel0ab5435edd98
diff --git a/.config/nextest.toml b/.config/nextest.toml
new file mode 100644
index 0000000000..b5bd5c0d8b
--- /dev/null
+++ b/.config/nextest.toml
@@ -0,0 +1,15 @@
+# cargo-nextest settings. CI Fast's coverage lane runs the Rust suites with
+# `OH_COV_RUNNER=nextest` (scripts/ci/rust-coverage.sh): every test in its own
+# process, in parallel, which isolates the core's process globals (event bus,
+# registries, env vars, one-shot OnceLocks) without changing them.
+
+[profile.ci]
+# Report every failure, never stop at the first.
+fail-fast = false
+# Flag a slow test after 60 s; a hung one is killed after 10 minutes.
+slow-timeout = { period = "60s", terminate-after = 10 }
+# Print failures at the end, where the lane log's tail shows them.
+failure-output = "final"
+success-output = "never"
+status-level = "fail"
+final-status-level = "fail"
diff --git a/scripts/ci/rust-coverage.sh b/scripts/ci/rust-coverage.sh
index ad842959fd..5983e55ee4 100755
--- a/scripts/ci/rust-coverage.sh
+++ b/scripts/ci/rust-coverage.sh
@@ -128,20 +128,29 @@ run_integration_target() {
fi
}
-log "running complete instrumented Rust suite"
+log "running complete instrumented Rust suite (runner: ${OH_COV_RUNNER:-cargo})"
llvm_cov clean --workspace
-# Keep the aggregate unit-test process aligned with the canonical Rust runner.
-# The isolated reaper test installs one-shot process globals, so it cannot run
-# in the same process as the rest of the library tests.
-suite "openhuman lib+bins" llvm_cov --no-report --no-fail-fast -p openhuman --lib --bins -- \
- --test-threads=1 \
- --skip a_build_only_runtime_is_swept_before_it_can_be_invoked
-
-log "running isolated build-only reaper test"
-suite "openhuman reaper (isolated)" llvm_cov --no-report --no-fail-fast -p openhuman --lib -- \
- openhuman::agent::tinyagents::reaper::tests::a_build_only_runtime_is_swept_before_it_can_be_invoked \
- --exact --test-threads=1
+if [ "${OH_COV_RUNNER:-cargo}" = "nextest" ]; then
+ # cargo-nextest runs every test in its own process, in parallel. Process
+ # globals (the event bus, registries, env vars, one-shot OnceLocks) are then
+ # per test, so the serial runner and the isolated reaper run below are not
+ # needed: every test is isolated. Settings: .config/nextest.toml [profile.ci].
+ suite "openhuman lib+bins (nextest)" llvm_cov nextest --profile ci --no-report \
+ --no-fail-fast -p openhuman --lib --bins
+else
+ # Keep the aggregate unit-test process aligned with the canonical Rust runner.
+ # The isolated reaper test installs one-shot process globals, so it cannot run
+ # in the same process as the rest of the library tests.
+ suite "openhuman lib+bins" llvm_cov --no-report --no-fail-fast -p openhuman --lib --bins -- \
+ --test-threads=1 \
+ --skip a_build_only_runtime_is_swept_before_it_can_be_invoked
+
+ log "running isolated build-only reaper test"
+ suite "openhuman reaper (isolated)" llvm_cov --no-report --no-fail-fast -p openhuman --lib -- \
+ openhuman::agent::tinyagents::reaper::tests::a_build_only_runtime_is_swept_before_it_can_be_invoked \
+ --exact --test-threads=1
+fi
# Run every root-workspace Rust support crate rather than only crates named by
# changed paths. Product features are forwarded to the embedding facade; the