Skip to content

Commit

Permalink
dev: Use cargo-make for common tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkaplan committed May 20, 2024
1 parent c74f94f commit 21c82f6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[alias]
deny = ["bin", "cargo-deny"]
insta = ["bin", "cargo-insta"]
make = ["bin", "cargo-make"]
nextest = ["bin", "cargo-nextest"]
tarpaulin = ["bin", "cargo-tarpaulin"]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.bin
/coverage
/target
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@ opt-level = 3

[package.metadata.bin]
cargo-deny = { version = "0.14.23" }
cargo-tarpaulin = { version = "0.30.0" }
cargo-insta = { version = "1.39.0" }
cargo-make = { version = '0.37.12' }
cargo-nextest = { version = "0.9.70" }
cargo-tarpaulin = { version = "0.30.0" }
35 changes: 35 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[config]
default_to_workspace = false
skip_core_tasks = true

[tasks.test]
description = "Run tests and review snapshots"
command = "cargo"
args = [
"insta", "test",
"--review",
"--unreferenced=delete",
"--test-runner=nextest",
# Run tests with `gc_tombstone` on so that object IDs don't get reused in
# snapshot test output.
"--features=gc_tombstone",
]

[tasks.coverage]
description = "Run tests to show a coverage report"
command = "cargo"
args = [
"tarpaulin",
"--skip-clean",
"--target-dir", "target/coverage",
"--out", "html",
"--output-dir", "coverage",
# Run tests with `gc_tombstone` on so that object IDs don't get reused in
# snapshot test output.
"--features=gc_tombstone",
]

[tasks.deny]
description = "Run cargo-deny checks"
command = "cargo"
args = ["deny", "check"]

0 comments on commit 21c82f6

Please sign in to comment.