-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 1.81 KB
/
Copy pathMakefile
File metadata and controls
39 lines (29 loc) · 1.81 KB
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
env ?= .env
# help -----------------------------------------------------------------------------------------------------------------------------------------------
help:
@python cli.py --make-help
# quickstart -----------------------------------------------------------------------------------------------------------------------------------------
quickstart:
@python cli.py --quickstart --env-file $(env)
# create-admon ----------------------------------------------------------------------------------------------------------------------------------------
create-api-key:
@python scripts/create_api_key.py
# dev ------------------------------------------------------------------------------------------------------------------------------------------------
dev:
@python cli.py --dev --env-file $(env)
# lint -----------------------------------------------------------------------------------------------------------------------------------------------
lint:
@pre-commit run --all-files
# test -----------------------------------------------------------------------------------------------------------------------------------------------
test-unit:
@PYTHONPATH=. pytest -s api/tests/unit --config-file=pyproject.toml --cov=./api --cov-report=html --cov-report=term-missing --cov-branch --cov-report=xml
TEST_INTEG_ARG := $(word 2,$(MAKECMDGOALS))
TEST_INTEG_SUFFIX := $(if $(TEST_INTEG_ARG),/$(TEST_INTEG_ARG),)
# test-integ -----------------------------------------------------------------------------------------------------------------------------------------
test-integ:
@python cli.py --test-integ && \
set -a; . .github/.env.ci; set +a; \
PYTHONPATH=. pytest api/tests/integ$(TEST_INTEG_SUFFIX) --config-file=pyproject.toml --cov=./api --cov-report=xml;
%:
@:
.PHONY: help quickstart dev lint test-unit test-integ create-api-key