Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
140 lines (106 loc) · 2.16 KB
/
Copy pathMakefile
File metadata and controls
140 lines (106 loc) · 2.16 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
COMPOSE := docker compose -f docker-compose.yml
# Test database URIs
SCYLLA_URI ?= 127.0.0.2:9042
SCYLLA_URI2 ?= 127.0.0.3:9042
SCYLLA_URI3 ?= 127.0.0.4:9042
# Export for tests
export SCYLLA_URI
export SCYLLA_URI2
export SCYLLA_URI3
.PHONY: all
all: test
.PHONY: ci
ci: static test
.PHONY: static
static: static-rust static-python
.PHONY: static-rust
static-rust: fmt-check-rust check-rust clippy
.PHONY: static-python
static-python: fmt-check-python check-python type-check
.PHONY: fmt
fmt: fmt-rust fmt-python
.PHONY: fmt-rust
fmt-rust:
cargo fmt --all
.PHONY: fmt-check-rust
fmt-check-rust:
cargo fmt --all -- --check
.PHONY: check-rust
check-rust:
cargo check --all-targets
.PHONY: clippy
clippy:
RUSTFLAGS="-Dwarnings --cfg scylla_unstable" cargo clippy --all-targets --features python-extension,openssl-010,rust-tests
.PHONY: fmt-python
fmt-python:
uv run ruff format .
.PHONY: fmt-check-python
fmt-check-python:
uv run ruff format --check
.PHONY: check-python
check-python:
uv run ruff check
.PHONY: lint
lint:
uv run ruff check --fix .
.PHONY: type-check
type-check:
$(MAKE) -C docs setup
uv run basedpyright
uv run basedpyright -p docs
.PHONY: requires_db
requires_db:
uv run pytest -v -m requires_db
.PHONY: test
test:
uv run pytest -v
.PHONY: test-rust
test-rust:
cargo test --no-default-features --features rust-tests
.PHONY: coverage
coverage:
scripts/coverage.sh
.PHONY: build
build: build-rust build-python
.PHONY: build-rust
build-rust:
cargo build
.PHONY: build-python
build-python:
uv build
.PHONY: up
up:
$(COMPOSE) up -d --wait
@echo
@echo "ScyllaDB cluster is running in the background. Use 'make down' to stop it."
@echo
.PHONY: down
down:
$(COMPOSE) down --remove-orphans
.PHONY: logs
logs:
$(COMPOSE) logs -f
.PHONY: cqlsh
cqlsh:
$(COMPOSE) exec scylla1 cqlsh -u cassandra -p cassandra
.PHONY: shell
shell:
$(COMPOSE) exec scylla1 bash
.PHONY: clean
clean: down
cargo clean
uv clean
rm -rf docs/book
$(MAKE) docs-clean
.PHONY: docs
docs:
$(MAKE) -C docs dirhtml
.PHONY: docs-preview
docs-preview:
$(MAKE) -C docs preview
.PHONY: docs-clean
docs-clean:
$(MAKE) -C docs clean
.PHONY: docs-test
docs-test:
$(MAKE) -C docs test