|
@@ -24,12 +24,64 @@ script = [
|
|
|
]
|
|
|
script_runner = "@duckscript"
|
|
|
|
|
|
+[tasks.format]
|
|
|
+command = "cargo"
|
|
|
+args = ["fmt", "--all"]
|
|
|
+
|
|
|
+[tasks.check]
|
|
|
+command = "cargo"
|
|
|
+args = ["check", "--workspace", "--examples", "--tests"]
|
|
|
+
|
|
|
+[tasks.clippy]
|
|
|
+command = "cargo"
|
|
|
+args = [
|
|
|
+ "clippy",
|
|
|
+ "--workspace",
|
|
|
+ "--examples",
|
|
|
+ "--tests",
|
|
|
+ "--",
|
|
|
+ "-D",
|
|
|
+ "warnings",
|
|
|
+]
|
|
|
+
|
|
|
+[tasks.tidy]
|
|
|
+category = "Formatting"
|
|
|
+dependencies = ["format", "check", "clippy"]
|
|
|
+description = "Format and Check workspace"
|
|
|
+
|
|
|
+[tasks.install-miri]
|
|
|
+toolchain = "nightly"
|
|
|
+install_crate = { rustup_component_name = "miri", binary = "cargo +nightly miri", test_arg = "--help" }
|
|
|
+private = true
|
|
|
+
|
|
|
+[tasks.miri-native]
|
|
|
+command = "cargo"
|
|
|
+toolchain = "nightly"
|
|
|
+dependencies = ["install-miri"]
|
|
|
+args = [
|
|
|
+ "miri",
|
|
|
+ "test",
|
|
|
+ "--package",
|
|
|
+ "dioxus-native-core",
|
|
|
+ "--test",
|
|
|
+ "miri_native",
|
|
|
+]
|
|
|
+
|
|
|
+[tasks.miri-stress]
|
|
|
+command = "cargo"
|
|
|
+toolchain = "nightly"
|
|
|
+dependencies = ["install-miri"]
|
|
|
+args = ["miri", "test", "--package", "dioxus-core", "--test", "miri_stress"]
|
|
|
+
|
|
|
+[tasks.miri]
|
|
|
+dependencies = ["miri-native", "miri-stress"]
|
|
|
+
|
|
|
[tasks.tests]
|
|
|
category = "Testing"
|
|
|
dependencies = ["tests-setup"]
|
|
|
description = "Run all tests"
|
|
|
-env = {CARGO_MAKE_WORKSPACE_SKIP_MEMBERS = ["**/examples/*"]}
|
|
|
-run_task = {name = ["test-flow", "test-with-browser"], fork = true}
|
|
|
+env = { CARGO_MAKE_WORKSPACE_SKIP_MEMBERS = ["**/examples/*"] }
|
|
|
+run_task = { name = ["test-flow", "test-with-browser"], fork = true }
|
|
|
|
|
|
[tasks.build]
|
|
|
command = "cargo"
|
|
@@ -42,10 +94,24 @@ private = true
|
|
|
[tasks.test]
|
|
|
dependencies = ["build"]
|
|
|
command = "cargo"
|
|
|
-args = ["test", "--lib", "--bins", "--tests", "--examples", "--workspace", "--exclude", "dioxus-router", "--exclude", "dioxus-desktop"]
|
|
|
+args = [
|
|
|
+ "test",
|
|
|
+ "--lib",
|
|
|
+ "--bins",
|
|
|
+ "--tests",
|
|
|
+ "--examples",
|
|
|
+ "--workspace",
|
|
|
+ "--exclude",
|
|
|
+ "dioxus-router",
|
|
|
+ "--exclude",
|
|
|
+ "dioxus-desktop",
|
|
|
+]
|
|
|
private = true
|
|
|
|
|
|
[tasks.test-with-browser]
|
|
|
-env = { CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS = ["**/packages/router", "**/packages/desktop"] }
|
|
|
+env = { CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS = [
|
|
|
+ "**/packages/router",
|
|
|
+ "**/packages/desktop",
|
|
|
+] }
|
|
|
private = true
|
|
|
workspace = true
|