forked from CassioML/cassio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (46 loc) · 2.03 KB
/
Makefile
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
SHELL := /bin/bash
.PHONY: all format format-fix format-tests format-src test-all test-unit test-integration test-astra-integration test-cassandra-integration build help
all: help
FMT_FLAGS ?= --check
format: format-src format-tests
format-tests:
poetry run ruff tests
poetry run isort tests $(FMT_FLAGS) --profile black
poetry run black tests $(FMT_FLAGS)
poetry run mypy tests
format-src:
poetry run ruff src
poetry run isort src $(FMT_FLAGS) --profile black
poetry run black src $(FMT_FLAGS)
poetry run mypy src
format-fix: FMT_FLAGS=
format-fix: format-src format-tests
test-all: test-unit test-integration
test-unit:
poetry run pytest tests/unit -vv
test-integration:
poetry run pytest tests/integration -vv
test-astra-integration:
TEST_DB_MODE="ASTRA_DB" poetry run pytest tests/integration -vv
test-cassandra-integration:
TEST_DB_MODE="LOCAL_CASSANDRA" poetry run pytest tests/integration -vv
test-testcontainerscassandra-integration:
TEST_DB_MODE="TESTCONTAINERS_CASSANDRA" poetry run pytest tests/integration -vv
build:
rm -f dist/cassio*
poetry build
help:
@echo "======================================================================"
@echo "CassIO make command purpose"
@echo "----------------------------------------------------------------------"
@echo "format lint, style and typecheck"
@echo " format-tests ... on test code"
@echo " format-src ... on library code"
@echo "test-all run all tests"
@echo " test-unit ... only unit tests"
@echo " test-integration ... only integration tests"
@echo " test-astra-integration ... explicitly on Astra"
@echo " test-cassandra-integration ... explicitly on Cassandra"
@echo " test-testcontainerscassandra-integration ... with testcontainers"
@echo "build create new 'dist/*', ready for PyPI"
@echo "======================================================================"