-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (52 loc) · 1.69 KB
/
Copy pathMakefile
File metadata and controls
67 lines (52 loc) · 1.69 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
.PHONY: target
target:
$(info ${HELP_MESSAGE})
@exit 0
.PHONY: init
init:
pip3 install -r requirements/base.txt -r requirements/dev.txt
.PHONY: test
test: check-format
pytest --cov awslambdaric --cov-report term-missing --cov-fail-under 90 tests
.PHONY: test-integ
test-integ:
@echo "Integration tests run via GitHub Actions (see .github/workflows/test-on-push-and-pr.yml)"
@echo "To run a single combo locally:"
@echo " make test-integ-local DISTRO=alpine DISTRO_VERSION=3.20 RUNTIME_VERSION=3.13"
.PHONY: test-integ-local
test-integ-local:
tests/integration/run-local.sh $(DISTRO) $(DISTRO_VERSION) $(RUNTIME_VERSION)
.PHONY: check-security
check-security:
bandit -r awslambdaric
.PHONY: format
format:
black setup.py awslambdaric/ tests/
.PHONY: check-format
check-format:
black --check setup.py awslambdaric/ tests/
# Command to run everytime you make changes to verify everything works
.PHONY: dev
dev: init test
# Verifications to run before sending a pull request
.PHONY: pr
pr: init check-format check-security dev
.PHONY: clean
clean:
rm -rf dist
rm -rf awslambdaric.egg-info
.PHONY: build
build: clean
BUILD=true python3 setup.py sdist
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 our formatting.
build Builds the package.
clean Cleans the working directory by removing built artifacts.
dev Run all development tests after a change.
init Initialize and install the requirements and dev-requirements for this project.
pr Perform all checks before submitting a Pull Request.
test Run the Unit tests.
endef