forked from Soroban-Smart-Block-Explorer/Soroban-Smart-Block
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
125 lines (91 loc) · 3.74 KB
/
Copy pathMakefile
File metadata and controls
125 lines (91 loc) · 3.74 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
.PHONY: build test check deploy indexer frontend clean fmt fmt-check lint \
docker-up docker-down docker-build docker-logs docker-test docker-staging docker-prod \
e2e e2e-setup e2e-test e2e-api e2e-chaos e2e-property e2e-playwright e2e-k6 e2e-full
# ── Contract ──────────────────────────────────────────────────────────────────
build:
cargo build --release --target wasm32-unknown-unknown \
-p soroban-explorer-contract
test:
cargo test -p soroban-explorer-contract
fmt:
cargo fmt
fmt-check:
cargo fmt --check
lint:
cargo clippy -- -D warnings
check: fmt-check lint test
optimize:
stellar contract optimize \
--wasm target/wasm32-unknown-unknown/release/soroban_explorer_contract.wasm
deploy: build optimize
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/soroban_explorer_contract.optimized.wasm \
--source default \
--network testnet
# ── Indexer ───────────────────────────────────────────────────────────────────
indexer-install:
cd indexer && npm install
indexer:
cd indexer && npm start
# ── Frontend ──────────────────────────────────────────────────────────────────
frontend-install:
cd frontend && npm install
frontend:
cd frontend && npm run dev
frontend-build:
cd frontend && npm run build
# ── Docker ─────────────────────────────────────────────────────────────────────
# Start dev stack (hot-reload via docker-compose.override.yml)
# Uses Dockerfile.dev for indexer + frontend with source mounts
docker-up:
docker compose up -d
# Start production stack (no overrides, uses Dockerfile)
docker-prod:
docker compose -f docker-compose.yml --profile prod up -d
# Start staging stack (mirror of prod)
docker-staging:
docker compose -f docker-compose.yml --profile staging up -d
# CI / integration test stack
docker-test:
docker compose -f docker-compose.yml --profile test up -d --abort-on-container-exit
# Stop all containers
docker-down:
docker compose down
# Build all images without running
docker-build:
docker compose build
# Tail logs from all services
docker-logs:
docker compose logs -f
# Rebuild a specific service (e.g., make docker-rebuild indexer)
docker-rebuild:
docker compose build $(filter-out $@,$(MAKECMDGOALS))
docker compose up -d $(filter-out $@,$(MAKECMDGOALS))
# Check container health status
docker-ps:
docker compose ps
# ── All ───────────────────────────────────────────────────────────────────────
install: indexer-install frontend-install
dev:
$(MAKE) -j2 indexer frontend
clean:
cargo clean
rm -rf frontend/dist
# ── E2E Tests ──────────────────────────────────────────────────────────────────
e2e-setup:
cd e2e && npm install && bash setup.sh
e2e-test:
cd e2e && npm run test:e2e
e2e-api:
cd e2e && npm run test:api
e2e-chaos:
cd e2e && npm run test:chaos
e2e-property:
cd e2e && npm run test:property
e2e-playwright:
cd e2e && npm run test:playwright
e2e-k6:
cd e2e && npm run test:k6
e2e-full:
cd e2e && npm run test:full
e2e: e2e-setup e2e-test