forked from moonrepo/moon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
81 lines (59 loc) · 1.76 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
[config]
default_to_workspace = false
skip_core_tasks = true
[tasks.clean]
command = "cargo"
args = ["clean"]
# BUILDING
[tasks.build]
command = "cargo"
args = ["build"]
# FORMATTING
[tasks.format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--all", "--", "--emit=files"]
# LINTING
[tasks.lint]
command = "cargo"
args = ["clippy", "--workspace", "--all-targets"]
# TESTING
[tasks.setup-test]
command = "cargo"
args = ["run", "--", "--log", "debug", "setup"]
env = { MOON_TEST = "true" }
cwd = "./tests/fixtures/cases"
[tasks.run-test]
command = "cargo"
args = ["test", "--workspace"]
[tasks.clean-test]
script = "rm -rf ./tests/fixtures/cases/.moon/cache"
condition = { platforms = ["mac", "linux"] }
[tasks.test]
run_task = { name = ["clean-test", "setup-test", "run-test", "clean-test"] }
[tasks.test-output]
command = "cargo"
args = ["test", "--workspace", "--", "--nocapture", "--show-output"]
# CODE COVERAGE
[tasks.test-coverage]
env = { RUSTFLAGS = "-Cinstrument-coverage", LLVM_PROFILE_FILE = "${PWD}/moon-%p-%m.profraw" }
run_task = { name = ["build", "test"] }
[tasks.generate-report]
command = "grcov"
args = [".", "-s", "./crates", "--binary-path", "./target/debug", "-t", "lcov", "--branch", "--ignore-not-existing", "--ignore", "**/errors.rs", "--ignore", "error/src/lib.rs", "-o", "./report.txt"]
[tasks.generate-html]
command = "grcov"
args = [".", "-s", "./crates", "--binary-path", "./target/debug", "-t", "html", "--branch", "--ignore-not-existing", "--ignore", "**/errors.rs", "--ignore", "error/src/lib.rs", "-o", "./coverage"]
[tasks.clean-profraw]
script = "rm -rf *.profraw"
## OTHER
[tasks.json-schemas]
command = "cargo"
args = ["run", "-p", "moon_config"]
[tasks.check]
dependencies = [
"format",
"lint",
"build",
"test"
]