Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
76 lines (62 loc) · 1.79 KB
/
Copy pathjustfile
File metadata and controls
76 lines (62 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# ECL Development Commands
# Default: show available commands
default:
@just --list
# Run all tests
test:
cargo test --workspace --all-features
# Run tests with coverage (library code only)
coverage:
cargo llvm-cov --workspace --lib --all-features --html
@echo "Coverage report: target/llvm-cov/html/index.html"
# Generate coverage and check threshold (≥95%)
coverage-check:
#!/usr/bin/env bash
set -euo pipefail
echo "Generating coverage report..."
cargo llvm-cov --workspace --lib --all-features --html --quiet
echo ""
echo "Coverage Summary:"
cargo llvm-cov --workspace --lib --all-features --summary-only
echo ""
COVERAGE=$(cargo llvm-cov --workspace --lib --all-features --summary-only | grep -oP '\d+\.\d+(?=%)' | head -1 || echo "0")
echo "Line coverage: $COVERAGE%"
if (( $(echo "$COVERAGE < 95" | bc -l) )); then
echo "❌ Coverage $COVERAGE% is below 95% threshold"
exit 1
else
echo "✅ Coverage $COVERAGE% meets 95% threshold"
fi
# Check code quality
lint:
cargo clippy --workspace --all-features --all-targets -- -D warnings
cargo fmt --all -- --check
# Format code
format:
cargo fmt --all
# Build all crates
build:
cargo build --workspace --all-features
# Build for release
build-release:
cargo build --workspace --all-features --release
# Run development environment (Restate + app)
dev:
docker compose up -d restate
cargo run --bin ecl-workflows
# Stop development environment
dev-stop:
docker compose down
# Clean build artifacts
clean:
cargo clean
rm -rf target/
# Check for dependency updates
outdated:
cargo outdated --workspace
# Run security audit
audit:
cargo audit
# Generate documentation
docs:
cargo doc --workspace --all-features --no-deps --open