-
Notifications
You must be signed in to change notification settings - Fork 311
/
Copy pathjustfile
70 lines (58 loc) · 2.47 KB
/
justfile
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
# Prints the list of recipes.
default:
@just --list
# Creates and runs a local devnet with solo validator. Includes ancillary services
# like metrics, postgres for storing ABCI events, and pindexer for munging those events.
dev:
./deployments/scripts/check-nix-shell && \
./deployments/scripts/run-local-devnet.sh \
--keep-project \
--config ./deployments/compose/process-compose-postgres.yml \
--config ./deployments/compose/process-compose-metrics.yml \
--config ./deployments/compose/process-compose-dev-tooling.yml
# Formats the rust files in the project.
fmt:
cargo fmt --all
# warms the rust cache by building all targets
build:
cargo build --release --all-features --all-targets
# Runs 'cargo check' on all rust files in the project.
check:
# check, failing on warnings
RUSTFLAGS="-D warnings" cargo check --release --all-targets --all-features --target-dir=target/check
# fmt dry-run, failing on any suggestions
cargo fmt --all -- --check
# Render livereload environment for editing the Protocol documentation.
protocol-docs:
# Access local docs at http://127.0.0.1:3002
cd docs/protocol && \
mdbook serve -n 127.0.0.1 --port 3002
# Generate code for Rust & Go from proto definitions.
proto:
./deployments/scripts/protobuf-codegen
# Run a local prometheus/grafana setup, to scrape a local node.
metrics:
./deployments/scripts/check-nix-shell && \
process-compose --no-server --config ./deployments/compose/process-compose-metrics.yml up --keep-tui
# Rebuild Rust crate documentation
rustdocs:
./deployments/scripts/rust-docs
# Run rust unit tests, via cargo-nextest
test:
cargo nextest run --release
# Run integration tests against the testnet, for validating HTTPS support
integration-testnet:
cargo nextest run --release --features integration-testnet -E 'test(/_testnet$/)'
# Run integration tests for pmonitor tool
integration-pmonitor:
./deployments/scripts/warn-about-pd-state
rm -rf /tmp/pmonitor-integration-test
# Prebuild binaries, so they're available inside the tests without blocking.
cargo build --release --bin pcli --bin pd --bin pmonitor
cargo -q run --release --bin pd -- --help > /dev/null
cargo nextest run --release -p pmonitor --features network-integration --no-capture --no-fail-fast
# Run smoke test suite, via process-compose config.
smoke:
./deployments/scripts/check-nix-shell
./deployments/scripts/warn-about-pd-state
./deployments/scripts/smoke-test.sh