From b5b0d152b88e2382abd48c33275e4d5205b55fd7 Mon Sep 17 00:00:00 2001 From: Bauke Date: Fri, 8 Apr 2022 20:28:41 +0200 Subject: [PATCH] Add cargo-make config. --- .gitignore | 3 +++ Makefile.toml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 Makefile.toml diff --git a/.gitignore b/.gitignore index 6985cf1..5a0faef 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ Cargo.lock # MSVC Windows builds of rustc generate these, which store debugging information *.pdb + +# Code coverage results +.coverage diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 0000000..d68688b --- /dev/null +++ b/Makefile.toml @@ -0,0 +1,39 @@ +[tasks.fmt] +command = "cargo" +args = ["fmt", "${@}"] + +[tasks.check] +command = "cargo" +args = ["check", "${@}"] + +[tasks.clippy] +command = "cargo" +args = ["clippy", "${@}"] + +[tasks.test] +command = "cargo" +args = ["test", "${@}"] + +[tasks.doc] +command = "cargo" +args = ["doc", "${@}"] + +[tasks.build] +command = "cargo" +args = ["build", "${@}"] + +[tasks.complete-check] +dependencies = ["fmt", "check", "clippy", "test", "doc", "build"] + +[tasks.code-coverage] +workspace = false +install_crate = "cargo-tarpaulin" +command = "cargo" +args = [ + "tarpaulin", + "--exclude-files=target/*", + "--out=html", + "--output-dir=.coverage", + "--skip-clean", + "--target-dir=target/tarpaulin" +]