Skip to content

Commit

Permalink
chore: improve just recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandervantrijffel committed Oct 22, 2024
1 parent 71696c8 commit 289a5d5
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
# override the default just command to show the list of available recipes
default:
@just --list

build-release:
cargo build --release --verbose

# lint with clippy
clippy-release:
cargo clippy --release -- -W warnings -W clippy::pedantic -W clippy::nursery -W clippy::all -W clippy::cargo -W clippy::cognitive_complexity -A clippy::cargo_common_metadata

test-all *ARGS:
# run all tests with nextest
test-all *ARGS: check-dependencies
cargo nextest run --verbose {{ ARGS }}

# run all tests with nextest in watch mode
test-watch-all *ARGS: check-dependencies
cargo watch -c -w . -x "nextest run --verbose {{ ARGS }}"

# build the project in release mode
build-release:
cargo build --release --verbose

# validate that cargo-nextest is installed
check-dependencies:
#!/bin/sh
! type cargo-nextest > /dev/null 2>&1 && {
echo "Make sure to install cargo-nextest";
exit 1;
echo "carg-nextest is not installed. Aborting...";
exit 1;
}
cargo nextest run --verbose {{ ARGS }}
exit 0;

0 comments on commit 289a5d5

Please sign in to comment.