A human-friendly DSL for ATProto Lexicons
at main 3.2 kB view raw
1# MLF Test Suite 2# Run with: just test 3 4# Default: run all tests 5default: test 6 7# Run all tests (excluding problematic packages) 8test: test-lang test-codegen test-diagnostics test-lexicon-fetcher test-validation 9 10# Run only language tests (mlf-lang crate) 11test-lang: 12 @echo "Running mlf-lang integration tests..." 13 cargo test -p mlf-lang --test integration_test -- --nocapture 14 15# Run codegen integration tests (multi-crate) 16test-codegen: 17 @echo "\nRunning codegen integration tests..." 18 cargo test -p mlf-integration-tests --test codegen_integration -- --nocapture 19 20# Run diagnostics integration tests (multi-crate) 21test-diagnostics: 22 @echo "\nRunning diagnostics integration tests..." 23 cargo test -p mlf-integration-tests --test diagnostics_integration -- --nocapture 24 25# Run lexicon fetcher tests 26test-lexicon-fetcher: 27 @echo "\nRunning lexicon fetcher tests..." 28 cargo test -p mlf-lexicon-fetcher -- --nocapture 29 30# Run validation tests 31test-validation: 32 @echo "\nRunning validation tests..." 33 cargo test -p mlf-validation 34 35# Run CLI integration tests (when implemented) 36test-cli: 37 @echo "\nRunning CLI integration tests..." 38 cargo test -p mlf-integration-tests --test cli_integration -- --nocapture 39 40# Run workspace resolution tests (when implemented) 41test-workspace: 42 @echo "\nRunning workspace resolution tests..." 43 cargo test -p mlf-integration-tests --test workspace_integration -- --nocapture 44 45# Run real-world round-trip tests (network-dependent, ignored by default) 46test-real-world: 47 @echo "\n🌐 Running real-world round-trip tests (fetches from network)..." 48 @echo "This will download lexicons from: app.bsky.*, net.anisota.*, place.stream.*, pub.leaflet.*" 49 @echo "" 50 cargo test -p mlf-integration-tests --test real_world_roundtrip -- --ignored --nocapture 51 52# Run all workspace tests (excluding problematic packages) 53test-all: 54 @echo "Running all workspace tests..." 55 cargo test --workspace --exclude tree-sitter-mlf --exclude mlf-wasm 56 57# Run tests with verbose output 58test-verbose: 59 cargo test --workspace --exclude tree-sitter-mlf --exclude mlf-wasm -- --nocapture 60 61# Quick check without running tests 62check: 63 cargo check --workspace --exclude tree-sitter-mlf 64 65# Format code 66fmt: 67 cargo fmt --all 68 69# Run clippy 70lint: 71 cargo clippy --workspace --exclude tree-sitter-mlf 72 73# Build everything 74build: 75 cargo build --workspace --exclude tree-sitter-mlf 76 77# Build release 78build-release: 79 cargo build --workspace --exclude tree-sitter-mlf --release 80 81# Clean build artifacts 82clean: 83 cargo clean 84 85# Show test statistics 86test-stats: 87 @echo "Test Statistics:" 88 @echo " Lang tests: 21 tests in mlf-lang/tests/lang/" 89 @echo " Codegen tests: 10 tests in tests/codegen/lexicon/" 90 @echo " Diagnostics tests: 1 test in tests/diagnostics/" 91 @echo " Lexicon fetcher tests: 33 tests in mlf-lexicon-fetcher/" 92 @echo " Validation tests: 12 tests in mlf-validation" 93 @echo "" 94 @echo "Total integration tests: 77" 95 96# List all test directories 97test-list: 98 @echo "Lang tests:" 99 @ls -1 mlf-lang/tests/lang/*/ 100 @echo "\nCodegen tests:" 101 @ls -1 tests/codegen/lexicon/*/