-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
72 lines (58 loc) · 1.59 KB
/
justfile
File metadata and controls
72 lines (58 loc) · 1.59 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
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
default:
@just --list
# Install git hooks
hooks-install:
./.githooks/install.sh
# Install local-ci tool (optional, for unified CI pipeline)
local-ci-install:
#!/usr/bin/env bash
if command -v local-ci >/dev/null 2>&1; then
echo "local-ci is already installed"
else
echo "Installing local-ci..."
if [[ -d ../local-ci ]]; then
cd ../local-ci && make build && mv local-ci $(go env GOPATH)/bin/ || echo "Please install from https://github.com/stevedores-org/local-ci"
else
echo "Please clone https://github.com/stevedores-org/local-ci and run 'make build'"
fi
fi
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all -- --check
clippy:
cargo clippy --workspace --all-targets -- -D warnings
test:
cargo test --workspace
bench:
cargo test --workspace --benches --no-run
doc:
cargo doc --workspace --no-deps
check:
cargo check --workspace
ci:
just fmt-check
just clippy
just test
just bench
just doc
flake-check:
nix flake check --print-build-logs
# Run full CI via local-ci tool (if installed)
local-ci:
#!/usr/bin/env bash
if command -v local-ci >/dev/null 2>&1; then
local-ci
else
echo "⚠️ local-ci not installed. Run 'just local-ci-install' first, or use 'just ci' for standard pipeline"
echo " For setup: https://github.com/stevedores-org/local-ci"
fi
# Run local-ci with auto-fix (formatting)
local-ci-fix:
#!/usr/bin/env bash
if command -v local-ci >/dev/null 2>&1; then
local-ci --fix
else
echo "local-ci not installed. Run: just local-ci-install"
fi