Repository navigation
ci: run Test and Doctests over every workspace member - #2965
Merged
Merged
Conversation
The Test (`cargo nextest run`) and Doctests (`cargo test --doc`) jobs acted on `default-members` only, so the native tests of rustledger-wasm, rustledger-ffi-wasi and rustledger-ffi-component, including the drift guards that pin those surfaces to the canonical pipeline, never ran in CI. - Test: `--workspace --exclude rustledger-ffi-component-tests`; that crate needs the built wasip2 component and is run, with a skip-marker check, by the Component Parity (wasip2) job. - Doctests: `--workspace`. - New step after Test fails if the run left the checkout dirty. `--all-features` enables rustledger-wasm's `ts-export`, whose tests write only the gitignored `bindings/bindings/`; the JSON Schema export is `#[ignore]` and env-gated, and the `bindings-fresh` job already diffs the checked-in bindings. - Add `.github/workflows/ci.yml` to the `code` path filter so a PR that changes only this workflow's cargo commands still runs them. Closes #2963 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
robcohen
added a commit
that referenced
this pull request
Nov 12, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
cimatrix):cargo nextest run --workspace --all-features --exclude rustledger-ffi-component-tests(wascargo nextest run --all-features).cargo test --workspace --doc --all-features(wascargo test --doc --all-features).git status --porcelainis non-empty..github/workflows/ci.ymladded to thecodepath filter inchanges.Why
Without
--workspace, cargo acts ondefault-members, which leaves out rustledger-wasm, rustledger-ffi-wasi, rustledger-ffi-component and rustledger-ffi-component-tests. Their native tests, including the drift guards (convert::check_parity,query_option_parity,surface_agreement, the ffi-wasi property tests, the wasmcost_number_wire_parity/wasm_surface_agreementtests, andparse_error_mapping_paritycoming with #2946), ran only on developer machines. #2962 fixed the same gap for Check, Clippy and Documentation.Decisions:
Component Parity (wasip2)job builds the component, runs those tests, and fails on the marker, so it already covers them. Its doctests are included in Doctests (it has none; the binary reports 0, which is harmless).ts-export/json-schemastay on (--all-features). Thets-exporttests write per-type.d.tsfiles only under the gitignoredcrates/rustledger-wasm/bindings/bindings/. The JSON Schema export test, the only one that writes a tracked file, is#[ignore]and additionally refuses to run withoutRUSTLEDGER_REGEN_SCHEMA=1. The checked-in bindings already have a freshness gate (bindings-freshrunsRUSTLEDGER_TS_CHECK=1 scripts/regen-bindings.sh, which also needs prettier and datamodel-code-generator), so the Test job does not duplicate it; instead the new clean-checkout step guarantees that no test, now or later, rewrites a tracked file without CI noticing.ci.ymlcomputedshould_build=false, so this very PR would have skipped Test and Doctests and merged the new commands untried.ci.ymlis now part of thecodefilter, so a change to this workflow's cargo commands runs them.How tested
Locally (nix develop, rustc 1.98.1,
RUST_MIN_STACK=8388608as in CI):cargo nextest run --workspace --all-features --exclude rustledger-ffi-component-tests: 6773 passed, 6 skipped (was 6480 / 4 ondefault-members).git status --porcelainclean afterwards.cargo test --workspace --doc --all-features: all pass (rustledger-wasm, rustledger-ffi-wasi, rustledger-ffi-component and ffi-component-tests currently have no runnable doctests, so this mostly guards future ones).cargo fmt --all -- --check: clean.No test in the newly covered crates failed on the host target; no extra rustup target is needed.
Runtime impact
--workspace, so sccache is warm for the library parts.main/PRs: Test job 7.5 to 10 min, build 4m52s to 9m11s depending on sccache hit rate (97% down to 26%), execution 78 to 124s for about 6480 tests. So test execution is unchanged within noise; the added cost is compiling the extra test binaries, which should shrink once sccache holds them (Check and Clippy already compile these crates). Doctests: 3m23s here vs 1 to 4 min before.Closes #2963
🤖 Generated with Claude Code