-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathMakefile
42 lines (30 loc) · 868 Bytes
/
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
install:
poetry install
install_poetry:
curl -sSL https://install.python-poetry.org | python -
tests: install tests_only tests_pre_commit
tests_pre_commit:
poetry run pre-commit run --all-files
tests_only:
poetry run pytest --cov=./ --cov-report=xml -vv
run_infra:
cd infra &&\
docker compose down &&\
docker compose up -d
clean_infra:
cd infra &&\
docker compose down --remove-orphans &&\
docker system prune -a --volumes -f
stop_infra:
cd infra &&\
docker compose down --remove-orphans
run_tests: run_infra sleep tests
run_unasync:
poetry run unasync postgrest tests
build_sync: run_unasync remove_pytest_asyncio_from_sync
remove_pytest_asyncio_from_sync:
sed -i 's/@pytest.mark.asyncio//g' tests/_sync/test_client.py
sed -i 's/_async/_sync/g' tests/_sync/test_client.py
sed -i 's/Async/Sync/g' tests/_sync/test_client.py
sleep:
sleep 2