forked from BoltzExchange/boltz-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
99 lines (76 loc) · 2.86 KB
/
Copy pathjustfile
File metadata and controls
99 lines (76 loc) · 2.86 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
_default:
@just --list
# === Rust workspace ===
boltz_core_feature_sets := '"" "bitcoin" "musig" "elements" "bitcoin,musig" "elements,musig" "bitcoin,elements" "bitcoin,elements,musig"'
# Compile boltz-core under every supported feature combination.
boltz-core-features:
#!/usr/bin/env bash
set -euo pipefail
for features in {{ boltz_core_feature_sets }}; do
echo "=== features: ${features:-<none>} ==="
cargo check -p boltz-core --no-default-features --features "$features"
done
# Build boltz-core rustdoc with warnings as errors and run all doctests.
boltz-core-docs:
RUSTDOCFLAGS='-D warnings' cargo doc -p boltz-core --no-deps
cargo test -p boltz-core --doc
# Build boltz-core rustdoc/doctests under every supported feature combination.
boltz-core-docs-features:
#!/usr/bin/env bash
set -euo pipefail
for features in {{ boltz_core_feature_sets }}; do
echo "=== docs features: ${features:-<none>} ==="
RUSTDOCFLAGS='-D warnings' cargo doc -p boltz-core --no-default-features --features "$features" --no-deps
cargo test -p boltz-core --no-default-features --features "$features" --doc
done
# Compile boltzr under every supported feature combination.
boltzr-features:
#!/usr/bin/env bash
set -euo pipefail
for features in "" "metrics" "loki" "otel" "metrics,loki" "metrics,otel" "loki,otel" "metrics,loki,otel"; do
echo "=== features: ${features:-<none>} ==="
cargo check -p boltzr --no-default-features --features "$features"
done
# Generate a new diesel migration under boltzr/migrations/ (e.g. `just migration add_foo`).
migration name:
diesel migration generate --migration-dir boltzr/migrations {{ name }}
# Run clippy with the exact flags CI uses (warnings = errors).
clippy:
cargo clippy --all-targets --all-features -- -D warnings
# === Formatting (Rust + TS/SQL/etc.) ===
# Check formatting for everything CI checks.
fmt-check:
cargo fmt --check
npm run prettier:check
# Auto-format Rust and TypeScript/SQL/etc.
fmt:
cargo fmt
npm run prettier:write
# === Aggregate ===
# Replay the build-rust CI job locally.
ci-rust: fmt-check clippy boltz-core-features boltz-core-docs
cargo test
# === Regtest / dev environment ===
# Start the full regtest stack (Docker + DB + smart contracts + nginx).
regtest-start:
npm run regtest:start
# Stop the regtest stack.
regtest-stop:
npm run regtest:stop
# === Tests ===
# Run TypeScript unit tests.
test-unit:
npm run test:unit
# Run TypeScript integration tests (requires regtest running).
test-integration:
node run-int.js
# === API / codegen ===
# Regenerate gRPC stubs from .proto files.
proto:
npm run proto
# Regenerate swagger-spec.json from JSDoc.
swagger:
npm run swagger
# Validate swagger-spec.json against OpenAPI 3.0 (matches CI).
swagger-validate:
npm run swagger:validate