From 5c8720d40cc35fa7fd03e955fc2ad74877ba398e Mon Sep 17 00:00:00 2001 From: Rohan Sircar Date: Wed, 12 May 2021 17:58:43 +0530 Subject: [PATCH] add cargo-make makefile --- Makefile.toml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Makefile.toml diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 0000000..bd9093f --- /dev/null +++ b/Makefile.toml @@ -0,0 +1,37 @@ +[tasks.watch] +install_crate = "watch" +command = "cargo" +args = ["watch", "-x", "run"] + +[tasks.format] +install_crate = "rustfmt" +command = "cargo" +args = ["fmt", "--all"] + +[tasks.format-check] +install_crate = "rustfmt" +command = "cargo" +args = ["fmt", "--all", "--", "--check"] + +[tasks.clippy-check] +install_crate = "clippy" +command = "cargo" +args = ["clippy", "--all", "--", "-D", "warnings"] + +[tasks.lint-check] +dependencies = ["format-check", "clippy-check"] + +[tasks.compile] +command = "cargo" +args = ["build"] + +[tasks.test] +command = "cargo" +args = ["test", "--lib"] + +[tasks.it-test] +command = "cargo" +args = ["test", "--test", "integration"] + +[tasks.stage] +dependencies = ["lint-check", "compile", "test", "it-test"]