mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-20 18:23:41 +00:00
ee806ab69a
## Description This sets the -Dwarnings flags so that the commands fail when there are warnings. The output of the full flow easily scrolls off screen so you don't notice things will fail on CI. ## Breaking Changes n/a ## Notes & open questions n/a ## Change checklist - [x] Self-review.
99 lines
2.5 KiB
TOML
99 lines
2.5 KiB
TOML
# Use cargo-make to run tasks here: https://crates.io/crates/cargo-make
|
|
|
|
[config]
|
|
skip_core_tasks = true
|
|
default_to_workspace = false
|
|
|
|
[env]
|
|
RUSTFLAGS = "-Dwarnings"
|
|
RUSTDOCFLAGS = "-Dwarnings"
|
|
|
|
[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", "${@}"]
|