forked from Octo-Protocol-org/Octo-Protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
63 lines (48 loc) · 1.62 KB
/
Copy pathjustfile
File metadata and controls
63 lines (48 loc) · 1.62 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
# octo dev tasks — run `just <task>`. Install: cargo install just
set dotenv-load := true
# List available tasks.
default:
@just --list
# Build the whole workspace.
build:
cargo build --workspace
# Run all tests.
test:
cargo test --workspace
# Run live Stellar testnet tests (friendbot funding, balances) — hits the network.
test-live:
OCTO_LIVE_TESTS=1 cargo test --workspace
# Format the code.
fmt:
cargo fmt --all
# Check formatting (CI mode).
fmt-check:
cargo fmt --all -- --check
# Lint with clippy, warnings as errors.
# NOTE: on toolchains built from a source tarball, clippy-driver rejects pre-compiled dependency
# rmeta with E0514 ("compiled by an incompatible version of rustc") even though its version matches
# rustc. If you hit that, it's the toolchain, not the code — clippy is enforced in CI instead.
lint:
cargo clippy --workspace --all-targets -- -D warnings
# Dependency/license/advisory audit.
deny:
cargo deny check
# Local pre-push checks that work on every toolchain (clippy + deny run in CI).
check: fmt-check test
# Everything CI runs (may fail locally on source-tarball toolchains due to the clippy E0514 bug).
ci: fmt-check lint test deny
# Start local Postgres.
db-up:
docker compose up -d db
# Stop local services.
db-down:
docker compose down
# Run database migrations.
migrate:
sqlx migrate run --source crates/store/migrations
# Drop & recreate the dev database schema (destructive — local only).
db-reset:
docker exec -i octo-db psql -U octo -d octo -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
# Run the server.
run:
cargo run -p octo-server