2022-02-01 19:40:29 +00:00
|
|
|
[config]
|
|
|
|
default_to_workspace = false
|
|
|
|
min_version = "0.32.4"
|
|
|
|
|
|
|
|
[env]
|
|
|
|
CARGO_MAKE_CLIPPY_ARGS = "-- --deny=warnings"
|
|
|
|
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
|
|
|
|
|
|
|
|
[config.modify_core_tasks]
|
|
|
|
namespace = "core"
|
|
|
|
private = true
|
|
|
|
|
|
|
|
[tasks.tests-setup]
|
|
|
|
private = true
|
|
|
|
script = [
|
|
|
|
"""
|
|
|
|
test_flags = array --headless --firefox
|
|
|
|
dioxus_test_features = set wasm_test
|
|
|
|
dioxus_test_flags = array_join ${test_flags} " "
|
|
|
|
echo "running tests with flags: ${dioxus_test_flags} and features: ${dioxus_test_features}"
|
|
|
|
set_env DIOXUS_TEST_FLAGS ${dioxus_test_flags}
|
|
|
|
set_env DIOXUS_TEST_FEATURES ${dioxus_test_features}
|
|
|
|
""",
|
|
|
|
]
|
|
|
|
script_runner = "@duckscript"
|
|
|
|
|
2023-11-28 22:41:14 +00:00
|
|
|
[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"]
|
|
|
|
|
2022-02-04 16:18:31 +00:00
|
|
|
[tasks.tests]
|
|
|
|
category = "Testing"
|
|
|
|
dependencies = ["tests-setup"]
|
|
|
|
description = "Run all tests"
|
2023-11-28 22:41:14 +00:00
|
|
|
env = { CARGO_MAKE_WORKSPACE_SKIP_MEMBERS = ["**/examples/*"] }
|
|
|
|
run_task = { name = ["test-flow", "test-with-browser"], fork = true }
|
2022-02-04 16:18:31 +00:00
|
|
|
|
|
|
|
[tasks.build]
|
|
|
|
command = "cargo"
|
|
|
|
args = ["build"]
|
|
|
|
|
2022-02-01 19:40:29 +00:00
|
|
|
[tasks.test-flow]
|
|
|
|
dependencies = ["test"]
|
|
|
|
private = true
|
|
|
|
|
|
|
|
[tasks.test]
|
2022-02-04 16:18:31 +00:00
|
|
|
dependencies = ["build"]
|
2022-02-01 19:40:29 +00:00
|
|
|
command = "cargo"
|
2023-11-28 22:41:14 +00:00
|
|
|
args = [
|
|
|
|
"test",
|
|
|
|
"--lib",
|
|
|
|
"--bins",
|
|
|
|
"--tests",
|
|
|
|
"--examples",
|
|
|
|
"--workspace",
|
|
|
|
"--exclude",
|
|
|
|
"dioxus-router",
|
|
|
|
"--exclude",
|
|
|
|
"dioxus-desktop",
|
2024-01-06 08:54:04 +00:00
|
|
|
"--exclude",
|
|
|
|
"dioxus-mobile",
|
2023-11-28 22:41:14 +00:00
|
|
|
]
|
2022-02-04 16:18:31 +00:00
|
|
|
private = true
|
|
|
|
|
|
|
|
[tasks.test-with-browser]
|
2023-11-28 22:41:14 +00:00
|
|
|
env = { CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS = [
|
|
|
|
"**/packages/router",
|
|
|
|
"**/packages/desktop",
|
|
|
|
] }
|
2022-02-01 19:40:29 +00:00
|
|
|
private = true
|
2022-02-04 16:18:31 +00:00
|
|
|
workspace = true
|