2025-06-08 12:02:29 -04:00
|
|
|
.PHONY: test test-unit test-e2e build run clean fmt lint check-fmt check test-verbose
|
|
|
|
|
|
|
|
|
|
# Test flags - run single-threaded to avoid env var races
|
|
|
|
|
TEST_FLAGS := -- --test-threads=1
|
2025-06-07 20:46:08 -04:00
|
|
|
|
|
|
|
|
# Build the project
|
|
|
|
|
build:
|
|
|
|
|
cargo build
|
|
|
|
|
|
2025-06-08 12:02:29 -04:00
|
|
|
# Build verbosely
|
|
|
|
|
build-verbose:
|
|
|
|
|
cargo build --verbose
|
|
|
|
|
|
2025-06-07 20:46:08 -04:00
|
|
|
# Run the project
|
|
|
|
|
run:
|
|
|
|
|
cargo run
|
|
|
|
|
|
|
|
|
|
# Run all tests
|
|
|
|
|
test: test-unit test-e2e
|
|
|
|
|
|
2025-06-08 12:02:29 -04:00
|
|
|
# Run all tests verbosely (for CI)
|
|
|
|
|
test-verbose:
|
|
|
|
|
cargo test --verbose $(TEST_FLAGS)
|
|
|
|
|
|
2025-06-07 20:46:08 -04:00
|
|
|
# Run unit tests only
|
|
|
|
|
test-unit:
|
2025-06-08 12:02:29 -04:00
|
|
|
cargo test --lib --bins $(TEST_FLAGS)
|
2025-06-07 20:46:08 -04:00
|
|
|
|
|
|
|
|
# Run e2e tests only
|
|
|
|
|
test-e2e:
|
2025-06-08 12:02:29 -04:00
|
|
|
cargo test --test '*' $(TEST_FLAGS)
|
|
|
|
|
|
|
|
|
|
# Run e2e tests verbosely (for CI)
|
|
|
|
|
test-e2e-verbose:
|
|
|
|
|
cargo test --test '*' --verbose $(TEST_FLAGS)
|
2025-06-07 20:46:08 -04:00
|
|
|
|
|
|
|
|
# Clean build artifacts
|
|
|
|
|
clean:
|
|
|
|
|
cargo clean
|
|
|
|
|
|
|
|
|
|
# Format code
|
|
|
|
|
fmt:
|
|
|
|
|
cargo fmt
|
|
|
|
|
|
|
|
|
|
# Run linter
|
|
|
|
|
lint:
|
|
|
|
|
cargo clippy -- -D warnings
|
|
|
|
|
|
|
|
|
|
# Check formatting
|
|
|
|
|
check-fmt:
|
|
|
|
|
cargo fmt -- --check
|
|
|
|
|
|
2025-06-08 12:02:29 -04:00
|
|
|
# Check code (for pre-commit)
|
|
|
|
|
check-code:
|
|
|
|
|
cargo check
|
|
|
|
|
|
2025-06-07 20:46:08 -04:00
|
|
|
# Run all checks (format, lint, test)
|
2025-06-07 21:27:18 -04:00
|
|
|
check: check-fmt lint test
|