generated from ran-isenberg/aws-lambda-handler-cookbook
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_windows
67 lines (49 loc) · 2.01 KB
/
Makefile_windows
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
.PHONY: dev lint complex coverage pre-commit sort deploy destroy deps unit infra-tests integration e2e coverage-tests docs lint-docs build format
dev:
pip install --upgrade pip pre-commit poetry
pre-commit install
poetry config --local virtualenvs.in-project true
poetry install --no-root
npm ci
format:
poetry run ruff check .
format-fix:
poetry run ruff format .
lint: format
@echo "Running mypy"
$(MAKE) mypy-lint
complex:
@echo "Running Radon"
poetry run radon cc -e 'tests\*,cdk.out\*,node_modules\*' .
@echo "Running xenon"
poetry run xenon --max-absolute B --max-modules A --max-average A -e 'tests\*,.venv\*,cdk.out\*,node_modules\*' .
pre-commit:
poetry run pre-commit run -a --show-diff-on-failure
deps:
poetry export --only=dev --format=requirements.txt > dev_requirements.txt
poetry export --without=dev --format=requirements.txt > lambda_requirements.txt
build: deps
if not exist ".build\lambdas\service" mkdir ".build\lambdas\service"
rmdir /S /Q .build\lambdas\service
echo D | xcopy /f /y service. .build\lambdas\service /s
if not exist ".build\common_layer" mkdir ".build\common_layer"
poetry export --without=dev --format=requirements.txt > .build\common_layer\requirements.txt
mypy-lint:
poetry run mypy --pretty service. docs\examples cdk tests
unit:
poetry run pytest tests\unit --cov-config=.coveragerc --cov=service --cov-report xml
integration:
poetry run pytest tests\integration --cov-config=.coveragerc --cov=service --cov-report xml
e2e:
poetry run pytest tests\e2e --cov-config=.coveragerc --cov=service --cov-report xml
pr: deps pre-commit complex lint lint-docs unit integration e2e
pipeline-tests:
poetry run pytest tests\unit tests\integration --cov-config=.coveragerc --cov=service --cov-report xml
deploy: build
npx cdk deploy --app=".venv\Scripts\python.exe app.py" --require-approval=never
destroy:
npx cdk destroy --app=".venv\Scripts\python.exe app.py" --force
docs:
poetry run mkdocs serve
lint-docs:
docker run -v \markdown 06kellyjac\markdownlint-cli --fix "docs"