-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathjustfile
More file actions
152 lines (112 loc) · 4.52 KB
/
Copy pathjustfile
File metadata and controls
152 lines (112 loc) · 4.52 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# ── unifly justfile ─────────────────────────────────────────────
# https://github.com/hyperb1iss/unifly
set dotenv-load
# List available recipes
default:
@just --list --unsorted
# ── Build ───────────────────────────────────────────────────────
# Build all crates (debug)
build:
cargo build --workspace
# Build all crates (release)
build-release:
cargo build --workspace --release
# ── Install ─────────────────────────────────────────────────────
# Install unifly (CLI + TUI + graphics charts)
install:
cargo install --path crates/unifly
# Install CLI-only binary
install-cli:
cargo install --path crates/unifly --no-default-features --features cli
# ── Quality ─────────────────────────────────────────────────────
# Run all checks (format + maintainability + clippy + test)
check: fmt-check maintainability clippy test
# Run clippy with workspace lints
clippy:
cargo clippy --workspace --all-targets
# Auto-fix clippy + formatting
fix:
cargo clippy --workspace --all-targets --fix --allow-dirty
cargo fmt --all
npx prettier --write .
# Format all code
fmt:
cargo fmt --all
npx prettier --write .
# Check formatting without modifying
fmt-check:
cargo fmt --all -- --check
npx prettier --check .
# Check maintainability hotspots for line-count regressions
maintainability:
scripts/check-maintainability.sh
# Lint = format check + maintainability + clippy
lint: fmt-check maintainability clippy
# ── Test ────────────────────────────────────────────────────────
# Run all tests
test:
cargo test --workspace
# Run tests with output
test-verbose:
cargo test --workspace -- --nocapture
# Run tests for a specific crate
test-crate crate:
cargo test -p {{crate}}
# Start the local UniFi controller used for e2e testing
e2e-up:
docker compose -f tests/e2e/docker-compose.yml up -d
# Stop and remove the local e2e controller
e2e-down:
docker compose -f tests/e2e/docker-compose.yml down -v --remove-orphans
# Wait until the local e2e controller is ready
e2e-wait:
tests/e2e/wait-for-controller.sh
# Compile the gated e2e test binary without running it
e2e-build:
cargo test -p unifly --features e2e --test e2e_test --no-run
# Run the gated e2e test suite against a running controller
e2e-test:
cargo test -p unifly --features e2e --test e2e_test -- --test-threads=1
# Full e2e lifecycle: start controller, wait, test, tear down
e2e:
#!/usr/bin/env bash
set -euo pipefail
cleanup() { just e2e-down; }
trap cleanup EXIT
just e2e-up
just e2e-wait
just e2e-test
# Update insta snapshots
snap-review:
cargo insta review
# ── Run ─────────────────────────────────────────────────────────
# Run the CLI with args
cli *args:
cargo run -p unifly -- {{args}}
# Run the TUI dashboard
tui *args:
cargo run -p unifly -- tui {{args}}
# ── Docs ────────────────────────────────────────────────────────
# Generate rustdoc for the workspace
doc:
cargo doc --workspace --no-deps --open
# Build the Zola docs site + generate llms.txt
docs-build:
cd docs && zola build && ./scripts/gen-llms-txt.sh
# Serve the docs site with live reload
docs-serve:
cd docs && zola serve
# ── Clean ───────────────────────────────────────────────────────
# Remove build artifacts
clean:
cargo clean
# ── Release ─────────────────────────────────────────────────────
# Dry-run cargo-dist
dist-plan:
cargo dist plan
# Build distributable artifacts
dist-build:
cargo dist build
# Update AUR package for a new release
aur-update version:
cd aur && ./update-aur.sh {{version}}