mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-22 11:13:44 +00:00
17ce182276
## Description Now depends on #590 merging first so the added test coverage actually passes. This replaces three different proptest functions (`random_interaction`, `random_interaction_with_multipath_simple_routing` and `random_interaction_with_multipath_complex_routing`) with a single `random_interaction` function with a `PairSetup` proptest parameter that effectively generates the different proptest cases these functions generate (and more!). This also: - fixes a bug where we were never generating a transport config that would allow testing any QNT operations ever - fixes a bug in the `Arbitrary` impl for `ArrayRangeSet` that required filtering out empty `ArrayRangeSet`s after the fact instead of generating them without them possibly being empty in the first place - improves the cargo-make scripts to enable optimizations for longer-running proptests, reducing runtime together with compliation time overall ## Change checklist <!-- Remove any that are not relevant. --> - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant.
95 lines
2.4 KiB
TOML
95 lines
2.4 KiB
TOML
# Use cargo-make to run tasks here: https://crates.io/crates/cargo-make
|
|
|
|
[config]
|
|
skip_core_tasks = true
|
|
default_to_workspace = false
|
|
|
|
[tasks.default]
|
|
alias = "dev-flow"
|
|
|
|
[tasks.dev-flow]
|
|
description = "Fast local sub-set of all CI checks"
|
|
dependencies = [
|
|
"format-check",
|
|
"check",
|
|
"clippy",
|
|
"doc",
|
|
"test",
|
|
"proptests-extralight",
|
|
]
|
|
|
|
|
|
[tasks.format]
|
|
description = "Format the rust files following style rules"
|
|
command = "cargo"
|
|
args = [
|
|
"fmt",
|
|
"--all",
|
|
"--",
|
|
"--config",
|
|
"unstable_features=true",
|
|
"--config",
|
|
"imports_granularity=Crate,group_imports=Preserve,reorder_imports=false,format_code_in_doc_comments=true",
|
|
]
|
|
|
|
[tasks.format-check]
|
|
description = "Check the rust files for formatting style"
|
|
command = "cargo"
|
|
args = [
|
|
"fmt",
|
|
"--all",
|
|
"--check",
|
|
"--",
|
|
"--config",
|
|
"unstable_features=true",
|
|
"--config",
|
|
"imports_granularity=Crate,group_imports=Preserve,reorder_imports=false,format_code_in_doc_comments=true",
|
|
]
|
|
|
|
[tasks.check]
|
|
description = "Run cargo-check for entire project"
|
|
command = "cargo"
|
|
args = ["check", "--workspace", "--all-features", "--all-targets"]
|
|
|
|
[tasks.clippy]
|
|
description = "Run cargo-clippy for entire project"
|
|
command = "cargo"
|
|
args = ["clippy", "--workspace", "--all-features", "--all-targets"]
|
|
|
|
[tasks.doc]
|
|
description = "Check the documentation build"
|
|
command = "cargo"
|
|
args = ["doc", "--workspace", "--all-features", "--no-deps", "--document-private-items"]
|
|
|
|
[tasks.test]
|
|
description = "Run unit tests"
|
|
command = "cargo"
|
|
args = [
|
|
"nextest",
|
|
"run",
|
|
"--workspace",
|
|
"--all-features",
|
|
"--exclude=fuzz",
|
|
"--lib",
|
|
"--bins",
|
|
"--tests",
|
|
"--no-fail-fast",
|
|
]
|
|
|
|
[tasks.proptests-long]
|
|
description = "Run proptests with high case count (runs for ~10 minutes)"
|
|
command = "cargo"
|
|
args = ["nextest", "run", "--package=noq-proto", "-P", "proptests", "--cargo-profile=proptests", "--no-fail-fast", "${@}"]
|
|
env = { "PROPTEST_CASES" = "100000" }
|
|
|
|
[tasks.proptests-light]
|
|
description = "Run proptests for CI (~1 minute)"
|
|
command = "cargo"
|
|
args = ["nextest", "run", "--package=noq-proto", "-P", "proptests", "--cargo-profile=proptests", "--no-fail-fast", "${@}"]
|
|
env = { "PROPTEST_CASES" = "10000" }
|
|
|
|
[tasks.proptests-extralight]
|
|
description = "Run proptests in regression-only mode (runs for <5 seconds)"
|
|
command = "cargo"
|
|
args = ["nextest", "run", "--package=noq-proto", "-P", "proptests", "--no-fail-fast", "${@}"]
|