forked from DioxusLabs/dioxus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
128 lines (111 loc) · 2.55 KB
/
Makefile.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[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"
[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 }
[tasks.build]
command = "cargo"
args = ["build"]
[tasks.test-flow]
dependencies = ["test", "docs"]
private = true
[tasks.test]
dependencies = ["build"]
command = "cargo"
args = [
"test",
"--lib",
"--bins",
"--tests",
"--examples",
"--workspace",
# These tests run on Ubuntu without a screen. Desktop tests that require a screen fail, so we skip them
"--exclude",
"dioxus-desktop",
"--exclude",
"dioxus-mobile",
]
private = true
[tasks.docs]
dependencies = ["build"]
command = "cargo"
args = [
"test",
"--doc",
"--workspace",
]
private = true
[tasks.test-with-browser]
env = { CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS = [
"**/packages/router",
"**/packages/desktop",
] }
private = true
workspace = true