-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 918 Bytes
/
Makefile
File metadata and controls
33 lines (27 loc) · 918 Bytes
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
.PHONY: build fmt unit-test
.PHONY: unit-coverage coverage-html all-coverage
# Build the contra-gateway binary
build:
@echo "Building contra-gateway..."
@cargo build --release
# Format and lint code
fmt:
@echo "Formatting contra-gateway..."
@cargo fmt --all
@cargo clippy --all-targets -- -D warnings
# Run unit tests
unit-test:
@echo "Running unit tests for contra-gateway..."
@cargo test --lib
# Run unit tests with coverage
unit-coverage:
@echo "Running unit tests with coverage for contra-gateway..."
@mkdir -p ../coverage
@cargo llvm-cov --lib --tests --lcov --output-path ../coverage/coverage-gateway-unit.lcov
# Generate HTML coverage report
coverage-html:
@echo "Generating HTML coverage report for contra-gateway..."
@mkdir -p ../coverage
@cargo llvm-cov --lib --tests --html --output-dir ../coverage/coverage-gateway-html
# Run all coverage tasks
all-coverage: unit-coverage coverage-html