-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (54 loc) · 1.88 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
62
63
64
65
66
67
68
69
70
71
export PYENV_ROOT := $(HOME)/.pyenv
export PATH := $(PYENV_ROOT)/bin:$(PATH)
.PHONY: init
init: install-poetry install
pre-commit install
.PHONY: install
install:
cd bridge_node && poetry config virtualenvs.in-project true && poetry install
.PHONY: install-poetry
install-poetry:
@which poetry > /dev/null && echo "Using poetry at $$(which poetry)" || (echo "Poetry not found, installing" && pip install poetry==1.7.1)
.PHONY: serve
serve:
docker compose -f docker-compose.dev.yaml up -d --build
.PHONY: create-shared-ca-cert
create-shared-ca-cert:
mkdir -p secrets/certs/ && cd secrets/certs/ && ../../bridge_node/scripts/create_ca_cert.py
.PHONY: serve-encrypted
serve-encrypted:
python server/serve_with_secrets.py docker-compose.encrypted.yaml
.PHONY: lint
lint:
cd bridge_node && poetry run ruff check
cd bridge_node && poetry run ruff format --check
.PHONY: test
test:
cd bridge_node && poetry run python -m pytest -s --no-cov --log-cli-level=info -v
.PHONY: test-cov
test-cov:
cd bridge_node && poetry run python -m pytest -s --cov --log-cli-level=info -v
.PHONY: unit-test
unit-test:
cd bridge_node && poetry run python -m pytest -m "not integration" --no-cov --log-cli-level=info -s
.PHONY: unit-test-verbose
unit-test-verbose:
cd bridge_node && COMPOSE_VERBOSE=1 poetry run python -m pytest -s --log-cli-level=info -m "not integration" --keep-containers
.PHONY: integration-test
integration-test:
cd bridge_node && poetry run python -m pytest -m "integration" --no-cov --log-cli-level=info
.PHONY: coverage
coverage:
cd bridge_node && poetry run coverage run
.PHONY:format
format:
cd bridge_node && poetry run ruff format
.PHONY: migrate
migrate:
cd bridge_node && poetry run alembic -n dev_from_outside upgrade head
.PHONY: build-python
build-python:
cd bridge_node && poetry install && poetry build
.PHONY: copy-abi
copy-abi:
python local_dev/scripts/copy_abi.py --no-compile