# SEPPO - Kubernetes Testing Framework
# Test orchestration made simple
# Show available commands (default)
default:
@just --list
# === Quick Commands ===
# Format Rust code
fmt:
@echo "๐ Formatting..."
cargo fmt --all
# Run tests (fast)
test:
@echo "๐งช Running tests..."
cargo test --workspace
# Build seppo binary
build:
@echo "๐จ Building seppo..."
cargo build --release
@echo "โ
Binary: target/release/seppo"
# === CI Checks ===
# Check formatting
fmt-check:
@echo "๐ Checking format..."
cargo fmt --all --check
# Lint with clippy
lint:
@echo "๐ Running clippy..."
cargo clippy --all-targets --all-features -- -D warnings
# Run all tests
test-all:
@echo "๐งช Running all tests..."
cargo test --workspace --all-features
# Security audit
audit:
@echo "๐ Running security audit..."
cargo audit || echo "โ ๏ธ cargo-audit not installed (run: cargo install cargo-audit)"
# Full CI (before pushing)
ci: fmt-check lint test-all audit build
@echo "โ
Local CI passed! Safe to push."
# === Development ===
# Run tests with live reload (requires cargo-watch)
watch:
@echo "๐ Watching for changes..."
cargo watch -x test || echo "โ cargo-watch not installed (run: cargo install cargo-watch)"
# Run specific test
test-one TEST:
@echo "๐งช Running test: {{TEST}}"
cargo test {{TEST}} -- --nocapture
# Check uncommitted changes
diff:
@echo "๐ Uncommitted changes:"
git diff
@echo "\n๐ฆ Staged changes:"
git diff --cached
# === Seppo Usage (Native API) ===
# Run example test (native Rust API)
example:
@echo "๐ฌ Running example test..."
cargo run --example simple || echo "โ ๏ธ No example found (check examples/ directory)"
# Run specific example
run-example NAME:
@echo "๐ฌ Running example: {{NAME}}"
cargo run --example {{NAME}}
# === Cleanup ===
# Clean build artifacts
clean:
@echo "๐งน Cleaning..."
cargo clean
# === Setup ===
# Install dev dependencies
setup:
@echo "๐ฆ Installing dev dependencies..."
cargo install cargo-watch cargo-nextest cargo-audit
brew install just kind kubectl
@echo "โ
Setup complete!"
# Install git hooks (pre-commit)
install-hooks:
@echo "๐ Installing git hooks..."
@if [ ! -f .git/hooks/pre-commit ]; then \
echo "โ ๏ธ Pre-commit hook not found (expected in .git/hooks/pre-commit)"; \
else \
chmod +x .git/hooks/pre-commit && echo "โ
Pre-commit hook installed"; \
fi
@echo "โ
Hooks ready!"
# === Git Shortcuts ===
# Commit (with pre-commit checks)
commit MESSAGE: fmt-check lint
git add .
git commit -m "{{MESSAGE}}"
# Commit + push (after full CI)
ship MESSAGE: ci
git add .
git commit -m "{{MESSAGE}}"
git push
# === Meta ===
# Show tool versions
versions:
@echo "Rust: $(rustc --version)"
@echo "Cargo: $(cargo --version)"
@echo "Just: $(just --version)"
@echo "Kind: $(kind version)"
# Project stats
stats:
@echo "๐ Project Statistics:"
@echo "Rust files: $(find . -name '*.rs' -not -path './target/*' | wc -l)"
@echo "Total lines: $(find . -name '*.rs' -not -path './target/*' | xargs wc -l | tail -1)"
@echo "Git commits: $(git rev-list --count HEAD)"