kogral/justfiles/test.just

90 lines
3.0 KiB
Plaintext
Raw Permalink Normal View History

2026-01-23 16:12:50 +00:00
# ╔══════════════════════════════════════════════════════════════════════╗
# ║ TEST RECIPES ║
# ║ Test workspace with different feature flags ║
# ╚══════════════════════════════════════════════════════════════════════╝
# Help for test module
help:
@echo "TEST MODULE"
@echo ""
@echo "Run all tests:"
@echo " just test::all All tests (default features)"
@echo " just test::all-features All tests with all features"
@echo ""
@echo "Test specific crates:"
@echo " just test::core Test kogral-core library"
@echo " just test::cli Test kogral-cli binary"
@echo " just test::mcp Test kogral-mcp server"
@echo ""
@echo "Test specific features:"
@echo " just test::core-db Test SurrealDB backend"
@echo " just test::core-ai Test fastembed integration"
@echo ""
@echo "Integration & docs:"
@echo " just test::integration Run integration tests only"
@echo " just test::doc Test documentation examples"
# === FULL TEST SUITES ===
# Run all tests (default features)
[doc("Run all tests with default features")]
all:
@echo "=== Testing workspace (default features) ==="
cargo test --workspace --lib
@echo "✓ All tests passed"
# Run all tests with all features enabled
[doc("Run all tests with all features")]
all-features:
@echo "=== Testing workspace (all features) ==="
cargo test --workspace --all-features
@echo "✓ All tests passed (all features)"
# === CRATE-SPECIFIC TESTS ===
# Test kogral-core library
[doc("Test kogral-core library")]
core:
@echo "=== Testing kogral-core ==="
cargo test --package kogral-core --lib
# Test kogral-cli binary
[doc("Test kogral-cli binary")]
cli:
@echo "=== Testing kogral-cli ==="
cargo test --package kogral-cli
# Test kogral-mcp server
[doc("Test kogral-mcp server")]
mcp:
@echo "=== Testing kogral-mcp ==="
cargo test --package kogral-mcp --lib
# === FEATURE-SPECIFIC TESTS ===
# Test SurrealDB backend
[doc("Test kogral-core with SurrealDB backend")]
core-db:
@echo "=== Testing kogral-core (SurrealDB) ==="
cargo test --package kogral-core --features surrealdb
# Test fastembed integration
[doc("Test kogral-core with fastembed")]
core-ai:
@echo "=== Testing kogral-core (fastembed) ==="
cargo test --package kogral-core --features fastembed
# === INTEGRATION & DOCS ===
# Run integration tests only
[doc("Run integration tests")]
integration:
@echo "=== Running integration tests ==="
cargo test --workspace --test '*'
# Test documentation examples
[doc("Test doc examples and doctests")]
doc:
@echo "=== Testing documentation examples ==="
cargo test --workspace --doc