.PHONY: help build test check fmt clippy clean doc all ci
all: fmt clippy test
help:
@echo "Available targets:"
@echo " build - Build the project"
@echo " test - Run all tests (uses TestContainers)"
@echo " check - Check that the project compiles"
@echo " fmt - Format code using rustfmt"
@echo " clippy - Run clippy lints"
@echo " clean - Clean build artifacts"
@echo " doc - Generate documentation"
@echo " all - Run fmt, clippy, and test (default)"
@echo " ci - Run all CI checks (check, clippy, test, fmt-check)"
@echo ""
@echo "Note: Tests automatically spin up PostgreSQL containers using TestContainers"
build:
cargo build
build-release:
cargo build --release
test:
cargo test
test-verbose:
cargo test -- --nocapture
check:
cargo check
fmt:
cargo fmt
fmt-check:
cargo fmt -- --check
clippy:
cargo clippy --all-targets --all-features -- -D warnings
clean:
cargo clean
doc:
cargo doc --no-deps
doc-open:
cargo doc --no-deps --open
update:
cargo update
outdated:
cargo outdated || echo "Run 'cargo install cargo-outdated' to check for outdated dependencies"
audit:
cargo audit || echo "Run 'cargo install cargo-audit' to check for security vulnerabilities"
ci: check clippy test fmt-check
fix:
cargo fix --allow-dirty --allow-staged
cargo clippy --fix --allow-dirty --allow-staged
cargo fmt