-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (59 loc) · 1.98 KB
/
Makefile
File metadata and controls
76 lines (59 loc) · 1.98 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
.PHONY: target
target:
$(info ${HELP_MESSAGE})
@exit 0
.PHONY: init
init:
python3 scripts/dev.py init
.PHONY: test
test:
python3 scripts/dev.py test
.PHONY: lint
lint:
python3 scripts/dev.py lint
.PHONY: clean
clean:
python3 scripts/dev.py clean
.PHONY: build
build: clean
python3 scripts/dev.py build
.PHONY: setup-codebuild-agent
setup-codebuild-agent:
docker build -t codebuild-agent - < tests/integration/codebuild-local/Dockerfile.agent
.PHONY: test-smoke
test-smoke: setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent tests/integration/codebuild-local/test_one.sh tests/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 3.9
.PHONY: test-integ
test-integ: setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild/.
.PHONY: check-security
check-security:
poetry run bandit -r awslambdaric
.PHONY: format
format:
poetry run ruff format awslambdaric/ tests/
.PHONY: check-format
check-format:
poetry run ruff format --check awslambdaric/ tests/
.PHONY: dev
dev: init test
.PHONY: pr
pr: init check-format check-security dev
.PHONY: codebuild
codebuild: setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild
define HELP_MESSAGE
Usage: $ make [TARGETS]
TARGETS
check-security Run bandit to find security issues.
format Run black to automatically update your code to match formatting.
build Build the package using scripts/dev.py.
clean Cleans the working directory using scripts/dev.py.
dev Run all development tests using scripts/dev.py.
init Install dependencies via scripts/dev.py.
pr Perform all checks before submitting a Pull Request.
test Run unit tests using scripts/dev.py.
lint Run all linters via scripts/dev.py.
test-smoke Run smoke tests inside Docker.
test-integ Run all integration tests.
endef