-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (42 loc) · 1.11 KB
/
Copy pathMakefile
File metadata and controls
59 lines (42 loc) · 1.11 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
.PHONY: all build test test-unit test-integration test-node db2-start db2-stop db2-status docs-install docs-build docs-serve clean
all: build test
build:
cargo build --workspace
build-release:
cargo build --workspace --release
db2-start:
@chmod +x tools/db2.sh
@./tools/db2.sh start
db2-stop:
@./tools/db2.sh stop
db2-status:
@./tools/db2.sh status
db2-reset:
@./tools/db2.sh reset
test-unit:
cargo test --workspace --lib
cargo test -p db2-proto
test-integration: db2-ensure
DB2_TEST_HOST=localhost \
DB2_TEST_PORT=50000 \
DB2_TEST_DATABASE=testdb \
DB2_TEST_USER=db2inst1 \
DB2_TEST_PASSWORD=db2wire_test_pw \
cargo test --workspace --test '*' -- --test-threads=4
test-node: db2-ensure
cd crates/db2-napi && npm ci && npm run build
cd tests/node && npm ci && npm test
docs-install:
cd docs && npm ci
docs-build:
cd docs && npm ci && npm run build
docs-serve:
cd docs && npm install && npm run dev
test: test-unit test-integration
db2-ensure:
@./tools/db2.sh status > /dev/null 2>&1 || ./tools/db2.sh start
capture:
@./tools/db2.sh capture
clean:
cargo clean
@./tools/db2.sh stop 2>/dev/null || true