forked from aws/aws-sam-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (38 loc) · 1.32 KB
/
Makefile
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
# Default value for environment variable. Can be overridden by setting the
# environment variable.
SAM_CLI_TELEMETRY ?= 0
init:
SAM_CLI_DEV=1 pip install -e '.[dev]'
test:
# Run unit tests
# Fail if coverage falls below 95%
pytest --cov samcli --cov-report term-missing --cov-fail-under 95 tests/unit
integ-test:
# Integration tests don't need code coverage
@echo Telemetry Status: $(SAM_CLI_TELEMETRY)
SAM_CLI_DEV=1 pytest tests/integration
func-test:
# Verify function test coverage only for `samcli.local` package
@echo Telemetry Status: $(SAM_CLI_TELEMETRY)
pytest --cov samcli.local --cov samcli.commands.local --cov-report term-missing tests/functional
regres-test:
@echo Telemetry Status: $(SAM_CLI_TELEMETRY)
SAM_CLI_DEV=1 pytest tests/regression
smoke-test:
# Smoke tests run in parallel
SAM_CLI_DEV=1 pytest -n 4 tests/smoke
lint:
# Linter performs static analysis to catch latent bugs
pylint --rcfile .pylintrc samcli
# Command to run everytime you make changes to verify everything works
dev: lint test
black:
black samcli/* tests/* scripts/*
black-check:
black --check samcli/* tests/* scripts/*
# Verifications to run before sending a pull request
pr: init dev black-check
update-isolated-req:
pipenv --three
pipenv run pip install -r requirements/base.txt
pipenv run pip freeze > requirements/isolated.txt