-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.toml
116 lines (104 loc) · 4.09 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
[env]
DATABASE_URL = "postgresql://postgres:postgres@postgres:5432/postgres"
RABBIT_URL = "amqp://rabbit:rabbit@rabbit:5672/rabbit"
KAFKA_BROKERS_URL = "kafka:9092"
[config]
default_to_workspace = false
# Check
[tasks.check]
description = "Run checks for each feature"
dependencies = ["check-scripts"]
[tasks.check-scripts]
description = "Run checks for each feature"
script = [
"cargo check",
"cargo check --features=postgres",
"cargo check --features=kafka",
"cargo check --features=rabbit",
"cargo check --features=rebuilder",
"cargo check --features=upcasting",
"cargo check --all-features"
]
# Build
[tasks.build]
description = "Build the binaries for each feature"
script = [
"cargo build -j 2",
"cargo build -j 2 --features=postgres",
"cargo build -j 2 --features=kafka",
"cargo build -j 2 --features=rabbit",
"cargo build -j 2 --features=rebuilder",
"cargo build -j 2 --features=upcasting",
"cargo build -j 2 --all-features"
]
# Format
[tasks.fmt-check]
description = "Runs the cargo rustfmt plugin to check everything is well formatted"
command = "cargo"
args = ["fmt", "--all", "--", "--check"]
# Tests
[tasks.test]
description = "Run tests"
command = "cargo"
args = ["test", "${@}", "--all-features"]
# Clippy
[tasks.clippy]
description = "Run clippy linter"
dependencies = ["clippy-scripts"]
[tasks.clippy-scripts]
description = "Run clippy linter"
dependencies = ["fmt-check"]
script = [
"cargo clippy -- -D warnings",
"cargo clippy --features=postgres -- -D warnings",
"cargo clippy --features=kafka -- -D warnings",
"cargo clippy --features=rabbit -- -D warnings",
"cargo clippy --features=rebuilder -- -D warnings",
"cargo clippy --features=upcasting -- -D warnings",
"cargo clippy --all-targets --all-features -- -D warnings"
]
# Run example
[tasks.examples]
description = "Run all configured examples"
script = [
"cargo run --example aggregate_deletion --features=postgres",
"cargo run --example event_bus --features=postgres,rabbit,kafka",
"cargo run --example eventual_view --features=postgres",
"cargo run --example locking_strategies --features=postgres",
"cargo run --example multi_aggregate_rebuild --features=postgres",
"cargo run --example readme --features=postgres",
"cargo run --example rebuilder --features=rebuilder,postgres",
"cargo run --example saga --features=postgres",
"cargo run --example schema --features=postgres",
"cargo run --example shared_view --features=postgres",
"cargo run --example store_crud --features=postgres",
"cargo run --example transactional_view --features=postgres",
"cargo run --example upcasting --features=postgres,upcasting",
]
[tasks.clippy-examples]
description = "Run clippy over all examples"
script = [
"cargo clippy --example aggregate_deletion --features=postgres -- -D warnings",
"cargo clippy --example event_bus --features=postgres,rabbit,kafka",
"cargo clippy --example eventual_view --features=postgres -- -D warnings",
"cargo clippy --example locking_strategies --features=postgres -- -D warnings",
"cargo clippy --example multi_aggregate_rebuild --features=postgres -- -D warnings",
"cargo clippy --example readme --features=postgres -- -D warnings",
"cargo clippy --example rebuilder --features=rebuilder,postgres -- -D warnings",
"cargo clippy --example saga --features=postgres -- -D warnings",
"cargo clippy --example schema --features=postgres -- -D warnings",
"cargo clippy --example shared_view --features=postgres -- -D warnings",
"cargo clippy --example store_crud --features=postgres -- -D warnings",
"cargo clippy --example transactional_view --features=postgres -- -D warnings",
"cargo clippy --example upcasting --features=postgres,upcasting -- -D warnings",
]
# Docs
[tasks.docs]
description = "Build docs as they are rendered on docs.rs"
command = "cargo"
args = ["doc", "--document-private-items", "--all-features", "--no-deps"]
env = { "RUSTDOCFLAGS" = "-Dwarnings" }
[tasks.release]
description = "Task to release the package to crates.io"
command = "cargo"
args = ["publish", "--no-verify"]