-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJustfile
More file actions
174 lines (130 loc) · 5.68 KB
/
Justfile
File metadata and controls
174 lines (130 loc) · 5.68 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# List available recipes
default:
@just --list
# Run the default local gate (tests, lint, fmt)
check: test lint fmt-check
# Run the faster no-test local gate (compile, lint, fmt)
check-fast: compile-check lint fmt-check
# Run heavyweight code checks that are useful before CI / release work
check-heavy: audit doc coverage-check
# Run the broad local code gate (tests/examples/lint/docs/coverage; benches excluded)
check-code: test-code lint-code fmt-check audit doc coverage-check
# Run Nix packaging verification separately from the regular code checks
check-packaging: nix-check
# Measure check pipeline timings (writes under .trueflow/measurements/)
measure-check profile="check":
./scripts/measure-checks.sh --profile "{{profile}}"
# Measure the faster no-test local gate
measure-check-fast:
./scripts/measure-checks.sh --profile check-fast
# Measure the heavyweight local gate
measure-check-heavy:
./scripts/measure-checks.sh --profile check-heavy
# Measure the broad local code gate
measure-check-code:
./scripts/measure-checks.sh --profile check-code
# Measure the separate packaging gate
measure-check-packaging:
./scripts/measure-checks.sh --profile check-packaging
# Measure the legacy local developer alias
measure-local-dev:
./scripts/measure-checks.sh --profile local-dev
# Measure the legacy minimum local correctness alias
measure-local-minimum:
./scripts/measure-checks.sh --profile local-minimum
# Fix all auto-fixable issues
fix: fix-clippy fix-fmt fix-audit fix-cargo
# Compile the local developer target set without running tests
compile-check:
cd trueflow && cargo check --features tui-test-support --lib --bins --tests
# Normal local cargo gates enable tui-test-support so the hidden vt100/PTy
# TUI regression harness keeps compiling in the ordinary developer loop.
# Compile the broad code target set without benches
compile-check-code:
cd trueflow && cargo check --features tui-test-support --lib --bins --tests --examples
# Run the local test suite with nextest
test:
cd trueflow && cargo nextest run --features tui-test-support
# Run the broad local test path without benches
test-code:
cd trueflow && cargo nextest run --features tui-test-support --lib --bins --tests --examples
# Run the vt100-backed and PTY-backed TUI integration suite
test-tui-e2e:
cd trueflow && cargo nextest run --features tui-test-support --test tui_vt100 --test tui_pty_smoke
# Run mutation tests
mutants:
cd trueflow && cargo mutants
# Run clippy lints for the fast local gate
lint:
cd trueflow && cargo clippy --features tui-test-support --lib --bins --tests -- -D warnings
# Run clippy across the broad local code target set without benches
lint-code:
cd trueflow && cargo clippy --features tui-test-support --lib --bins --tests --examples -- -D warnings
# Check formatting
fmt-check:
cd trueflow && cargo fmt --check --all
# Run cargo audit
audit:
cd trueflow && cargo audit
# Build this crate's documentation without dependency docs
# to keep the heavyweight local path focused and fast.
doc:
cd trueflow && cargo doc --features tui-test-support --no-deps
# Enforce minimum test coverage (line coverage) for the main crate target set.
coverage-check:
cd trueflow && cargo llvm-cov --features tui-test-support --lib --bins --tests --summary-only --ignore-filename-regex "src/commands/tui.rs" --fail-under-lines 80
# Verify the default flake package builds for this host
nix-check:
nix build --no-link .#default
# Verify only the native flake package builds
nix-check-native:
nix build --no-link .#native
# Verify only the default flake package builds
nix-check-default:
nix build --no-link .#default
# Verify only the static flake package builds
nix-check-static:
nix build --no-link .#static
# Verify the release flake package builds
nix-check-release:
nix build --no-link .#release
# Explicitly rerun package-build tests for the default flake package
nix-check-with-tests:
nix build --no-link .#default-with-tests
# Explicitly rerun package-build tests for the native flake package
nix-check-native-with-tests:
nix build --no-link .#native-with-tests
# Explicitly rerun package-build tests for the default flake package
nix-check-default-with-tests:
nix build --no-link .#default-with-tests
# Explicitly rerun package-build tests for the static flake package
nix-check-static-with-tests:
nix build --no-link .#static-with-tests
# Explicitly rerun package-build tests for the release flake package
nix-check-release-with-tests:
nix build --no-link .#release-with-tests
# Package the native Linux x86_64 musl release artifact on Linux x86_64
package-linux-release:
./scripts/package-linux-release.sh
# Smoke-test a packaged release artifact
smoke-test-release artifact:
./scripts/smoke-test-release.sh "{{artifact}}"
# Fix clippy issues without pulling benches into the normal fix path
fix-clippy:
cd trueflow && cargo clippy --features tui-test-support --lib --bins --tests --examples --fix --allow-dirty
# Format code
fix-fmt:
cd trueflow && cargo fmt --all
# Fix audit issues
fix-audit:
cd trueflow && cargo audit fix
# Run cargo fix without pulling benches into the normal fix path
fix-cargo:
cd trueflow && cargo fix --features tui-test-support --lib --bins --tests --examples --allow-dirty
# Run benchmark fixture validation and benchmarks
bench:
cd trueflow && cargo test --features bench --test e2e_bench_fixture && cargo bench --features bench
# Generate coverage report without pulling benches into the normal coverage path
coverage:
cd trueflow && cargo llvm-cov --features tui-test-support --lib --bins --tests --examples --html
@echo "Coverage report at trueflow/target/llvm-cov/html/index.html"