generated from sinofseven/template-lambda-by-terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
101 lines (80 loc) · 2.16 KB
/
Makefile
File metadata and controls
101 lines (80 loc) · 2.16 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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
SHELL = /usr/bin/env bash -xeuo pipefail
format: \
fmt-terraform \
fmt-python
fmt-terraform: \
fmt-terraform-root \
fmt-terraform-module-common \
fmt-terraform-module-events-slack-webhook-destination \
fmt-terraform-module-lambda-function \
fmt-terraform-module-lambda-function-basic
fmt-terraform-root:
terraform fmt
fmt-terraform-module-common:
cd terraform_modules/common; \
terraform fmt
fmt-terraform-module-events-slack-webhook-destination:
cd terraform_modules/events_slack_webhook_destination; \
terraform fmt
fmt-terraform-module-lambda-function:
cd terraform_modules/lambda_function; \
terraform fmt
fmt-terraform-module-lambda-function-basic:
cd terraform_modules/lambda_function_basic; \
terraform fmt
fmt-python:
poetry run ruff check --select I --fix src/ tests/ scripts/
poetry run ruff format src/ tests/ scripts/
lint: \
lint-terraform \
lint-python
lint-terraform: \
lint-terraform-root \
lint-terraform-module-common \
lint-terraform-module-events-slack-webhook-destination \
lint-terraform-module-lambda-function \
lint-terraform-module-lambda-function-basic
lint-terraform-root:
terraform fmt -check
lint-terraform-module-common:
cd terraform_modules/common; \
terraform fmt -check
lint-terraform-module-events-slack-webhook-destination:
cd terraform_modules/events_slack_webhook_destination; \
terraform fmt -check
lint-terraform-module-lambda-function:
cd terraform_modules/lambda_function; \
terraform fmt -check
lint-terraform-module-lambda-function-basic:
cd terraform_modules/lambda_function_basic; \
terraform fmt -check
lint-python:
poetry run ruff check src/ tests/
test-unit:
AWS_ACCESS_KEY_ID=dummy \
AWS_SECRET_ACCESS_KEY=dummy \
AWS_DEFAULT_REGION=ap-northeast-1 \
PYTHONPATH=src \
poetry run python -m pytest -vv tests/unit
compose-up:
docker compose up -d
sleep 5
compose-down:
docker compose down
get-outputs:
poetry run python scripts/get_outputs.py
.PHONY: \
format \
fmt-terraform \
fmt-terraform-root \
fmt-terraform-module-common \
fmt-python \
lint \
lint-terraform \
lint-terraform-root \
lint-terraform-module-common \
lint-python \
test-unit \
compose-up \
compose-down \
get-outputs