-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjustfile
More file actions
334 lines (253 loc) · 8.47 KB
/
Copy pathjustfile
File metadata and controls
334 lines (253 loc) · 8.47 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
set positional-arguments
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
# =========================
# Core
# =========================
# Show all available tasks.
default:
@just --list
# Verify local tooling versions used by tasks.
env-check:
cargo --version
rustup --version
gh --version
python --version
# Show installed Rust toolchains and active override.
rustup-show:
rustup show
# Show available Cargo subcommands.
cargo-list:
cargo --list
# =========================
# Quality / CI
# =========================
# Run formatter in check mode.
fmt:
cargo fmt --all -- --check
# Apply formatter.
fmt-fix:
cargo fmt --all
# Type-check workspace and all targets with all features.
check:
cargo check --workspace --all-targets --all-features
# Type-check workspace without all-features.
check-fast:
cargo check --workspace --all-targets
# Type-check workspace with one explicit feature.
check-feature feature:
cargo check --workspace --all-targets --features {{feature}}
# Run clippy with warnings denied (all features).
clippy:
cargo clippy --workspace --all-targets --all-features -- -D warnings
# Run clippy without all-features.
clippy-fast:
cargo clippy --workspace --all-targets -- -D warnings
# Run clippy with one explicit feature.
clippy-feature feature:
cargo clippy --workspace --all-targets --features {{feature}} -- -D warnings
# Apply clippy auto-fixes where possible.
clippy-fix:
cargo clippy --workspace --all-targets --all-features --fix --allow-dirty --allow-staged -- -D warnings
# Run full test matrix for workspace.
test:
cargo test --workspace --all-targets --all-features
# Run tests with cargo-nextest (preferred local/CI runner).
test-nextest:
cargo nextest run --workspace --all-features
# Run tests without all-features.
test-fast:
cargo test --workspace --all-targets
# Run tests with cargo-nextest without all-features.
test-nextest-fast:
cargo nextest run --workspace
# Run tests with one explicit feature.
test-feature feature:
cargo test --workspace --all-targets --features {{feature}}
# Run tests with cargo-nextest and one explicit feature.
test-nextest-feature feature:
cargo nextest run --workspace --features {{feature}}
# Run a single integration test target.
test-one target:
cargo test --test {{target}}
# Run tests by name filter.
test-filter filter:
cargo test --workspace --all-targets --all-features {{filter}}
# Run examples as test targets.
examples:
cargo test --workspace --examples --all-features
# Run examples with one explicit feature.
examples-feature feature:
cargo test --workspace --examples --features {{feature}}
# Run benchmark suite.
bench:
cargo bench
# Run Miri tests (requires nightly + miri component).
miri-test:
cargo +nightly miri test
# Full Definition of Done.
dod: fmt check clippy test doc
# CI-like full check with platform-specific script wrappers.
ci: dod doc-links version-check
# CI-like full check using cargo-nextest for test execution.
ci-nextest: fmt check clippy doc doc-links version-check
cargo nextest run --profile ci --workspace --all-features
# Fast local sanity pass.
quick: fmt check-fast test-fast
# Fast local sanity pass using cargo-nextest.
quick-nextest: fmt check-fast test-nextest-fast
# Full QA profile used before release.
qa-full: ci
# Full QA profile using cargo-nextest for test execution.
qa-nextest: ci-nextest
# =========================
# Docs
# =========================
# Build docs with all features.
doc:
cargo doc --no-deps --all-features
# Open local docs in browser.
doc-open:
cargo doc --no-deps --all-features --open
# Build docs helper script.
[unix]
docs-build:
bash ./scripts/build-docs.sh
# Build docs helper script.
[windows]
docs-build:
./scripts/build-docs.ps1
# Validate markdown links.
[unix]
doc-links:
bash ./scripts/check-doc-links.sh
# Validate markdown links.
[windows]
doc-links:
./scripts/check-doc-links.ps1
# Coverage summary.
[unix]
coverage:
bash ./scripts/coverage.sh
# Coverage summary.
[windows]
coverage:
./scripts/coverage.ps1
# Verify version refs in docs.
[unix]
version-check:
bash ./scripts/check-version-refs.sh
# Verify version refs in docs.
[windows]
version-check:
./scripts/check-version-refs.ps1
# Sync version refs in docs.
[unix]
version-sync:
bash ./scripts/update-version.sh
# Sync version refs in docs.
[windows]
version-sync:
./scripts/update-version.ps1
# Detect drift between Rust source and external Markdown docs.
docs-sync:
uv run --project tools/docs-sync docs-sync check
# Detect drift but exit 0 regardless of findings (migration aid).
docs-sync-warn:
uv run --project tools/docs-sync docs-sync check --warn-only
# Apply automatic docs-sync fixes (versions/snippets).
docs-sync-fix:
uv run --project tools/docs-sync docs-sync fix
# Write full docs-sync report to target/docs-sync.{txt,md,json}.
docs-sync-report:
uv run --project tools/docs-sync docs-sync check --format all --report target/docs-sync --warn-only
# Run the docs-sync tool's own test suite.
docs-sync-test:
cd tools/docs-sync && uv run pytest
# Lint + type-check the docs-sync tool itself.
docs-sync-lint:
cd tools/docs-sync && uv run ruff check .
cd tools/docs-sync && uv run ruff format --check .
cd tools/docs-sync && uv run mypy .
# =========================
# Dependencies
# =========================
# Show latest published version of a crate from crates.io.
search crate:
cargo search {{crate}} --limit 1
# Show crate metadata and latest version.
info crate:
cargo info {{crate}}
# Show outdated dependencies (root deps only).
deps-outdated:
cargo outdated --workspace --root-deps-only
# Show full outdated dependency report.
deps-outdated-all:
cargo outdated --workspace
# Update dependency requirements within compatible ranges (patch/minor).
deps-upgrade-compatible:
cargo upgrade --manifest-path crates/teamtalk/Cargo.toml
cargo upgrade --manifest-path crates/teamtalk-sys/Cargo.toml
# Update dependency requirements including major versions.
deps-upgrade-major:
cargo upgrade --manifest-path crates/teamtalk/Cargo.toml --incompatible allow --pinned allow
cargo upgrade --manifest-path crates/teamtalk-sys/Cargo.toml --incompatible allow --pinned allow
# Preview major dependency upgrades without applying them.
deps-major-report:
cargo upgrade --manifest-path crates/teamtalk/Cargo.toml --incompatible allow --pinned allow --dry-run
cargo upgrade --manifest-path crates/teamtalk-sys/Cargo.toml --incompatible allow --pinned allow --dry-run
# Refresh lockfile to newest allowed versions.
deps-update-lock:
cargo update
# Update lockfile for one package.
deps-update-one crate:
cargo update -p {{crate}}
# Full dependency refresh for patch/minor policy.
deps-refresh-compatible: deps-upgrade-compatible deps-update-lock
# Full dependency refresh including majors.
deps-refresh-major: deps-upgrade-major deps-update-lock
# Refresh patch/minor deps and run CI checks.
deps-safe-cycle: deps-refresh-compatible ci
# Refresh major deps and run CI checks.
deps-major-cycle: deps-refresh-major ci
# =========================
# Release / GitHub
# =========================
# List release-plz PRs and latest version tags.
release-status:
gh pr list --search "head:release-plz/" --state open --limit 20
gh release list --limit 10
# Trigger release-plz manual workflow in dry-run mode.
release-dry:
gh workflow run release-plz.yml -f dry_run=true
# Trigger release-plz manual workflow in publish mode.
release-run:
gh workflow run release-plz.yml -f dry_run=false
# Watch latest release-plz workflow run.
release-watch:
gh run watch $(gh run list --workflow "Release-plz" --limit 1 --json databaseId --jq '.[0].databaseId')
# Show open PRs.
pr-open:
gh pr list --state open --limit 30
# Show open release-plz PRs only.
pr-release-open:
gh pr list --search "head:release-plz/" --state open --limit 20
# Show recent workflow runs.
runs-list:
gh run list --limit 30
# Show recent failed workflow runs.
runs-fail:
gh run list --status failure --limit 20
# =========================
# Workspace
# =========================
# Remove build artifacts.
clean:
cargo clean
# Clean and rebuild checks.
rebuild: clean check
# Install common CLI tools used by this repository.
tools-install:
cargo install just cargo-edit cargo-outdated cargo-llvm-cov cargo-nextest
# Run TeamTalk header+docs audit pass.
audit-pass:
python scripts/audit_teamtalk_coverage.py --root .