-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (28 loc) · 1.35 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
buildpush:
docker buildx build --platform linux/amd64,linux/arm64 -t skyface753/chest-system-server -f app/Dockerfile . --push
docker buildx build --platform linux/amd64,linux/arm64 -t skyface753/chest-system-client -f react-app/Dockerfile ./react-app/ --push
docker buildx build --platform linux/amd64,linux/arm64 -t skyface753/chest-system-proxy -f proxy/Dockerfile ./proxy --push
install-requirements:
pip install -r requirements.txt
dev-docker:
docker-compose -f docker-compose-dev.yaml up -d --build
run:
uvicorn main:app --host 127.0.0.1 --port 8000 --reload
clear-db:
docker-compose -f docker-compose-dev.yaml exec server alembic downgrade base
migrate-db:
docker-compose -f docker-compose-dev.yaml exec server alembic upgrade head
reinit-db: clear-db migrate-db
integration-test:
DATABASE_HOST=localhost \
DATABASE_PORT=5432 \
DATABASE_USERNAME=postgres \
DATABASE_PASSWORD=mysecretpassword \
DATABASE_NAME=postgres \
POSTGRES_USER=postgres \
POSTGRES_PASSWORD=mysecretpassword \
POSTGRES_DB=postgres \
PYTHONPATH=. pytest -x --junitxml=report_integration_tests.xml --verbose --cov=app --cov-config=.coveragerc --cov-report=xml:cov.xml tests/integration/
service-test:
API_SERVER=localhost API_PORT=8000 PYTHONPATH=. pytest --pspec --verbose --color=yes --junitxml=report_service_tests.xml tests/service
test: service-test integration-test