This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
57 lines (45 loc) · 1.46 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
# this target runs checks on all files
quality:
ruff format --check .
ruff check .
mypy
# this target runs checks on all files and potentially modifies some of them
style:
ruff format .
ruff --fix .
# Pin the dependencies
lock:
poetry lock --no-update
# Build the docker
build:
poetry export -f requirements.txt --without-hashes --output requirements.txt
docker build . -t quackai/contribution-api:python3.9-alpine3.14
# Run the docker
run:
poetry export -f requirements.txt --without-hashes --output requirements.txt
docker compose up -d --build
# Run the docker
stop:
docker compose down
run-dev:
poetry export -f requirements.txt --without-hashes --with test --output requirements.txt
docker compose -f docker-compose.test.yml up -d --build
stop-dev:
docker compose -f docker-compose.test.yml down
# Run tests for the library
test:
poetry export -f requirements.txt --without-hashes --with test --output requirements.txt
docker compose -f docker-compose.test.yml up -d --build
docker compose exec -T backend pytest --cov=app
docker compose -f docker-compose.test.yml down
add-revision:
docker compose exec backend alembic revision --autogenerate
apply-revision:
docker compose exec backend alembic upgrade head
# Run tests for the library
e2e:
poetry export -f requirements.txt --without-hashes --output requirements.txt
docker compose -f docker-compose.test.yml up -d --build
sleep 5
python scripts/test_e2e.py
docker compose -f docker-compose.test.yml down