moto/Makefile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
2.0 KiB
Makefile
Raw Permalink Normal View History

2013-02-18 21:09:40 +00:00
SHELL := /bin/bash
SERVICE_NAME = "default"
TEST_NAMES = "*"
ifeq ($(TEST_SERVER_MODE), true)
# Exclude parallel tests
TEST_EXCLUDE := --ignore tests/test_acm --ignore tests/test_amp --ignore tests/test_awslambda --ignore tests/test_batch --ignore tests/test_ec2 --ignore tests/test_sqs
2021-10-05 17:11:07 +00:00
# Parallel tests will be run separate
PARALLEL_TESTS := ./tests/test_acm/ ./tests/test_acmpca/ ./tests/test_amp/ ./tests/test_awslambda ./tests/test_batch ./tests/test_ec2 ./tests/test_sqs
else
TEST_EXCLUDE := --ignore tests/test_batch --ignore tests/test_ec2 --ignore tests/test_sqs
PARALLEL_TESTS := ./tests/test_batch ./tests/test_ec2 ./tests/test_sqs
endif
2013-02-18 21:09:40 +00:00
init:
@pip install -e .
2019-07-09 01:42:24 +00:00
@pip install -r requirements-dev.txt
2013-02-18 21:09:40 +00:00
2017-03-13 00:18:49 +00:00
lint:
2023-09-03 06:16:24 +00:00
@echo "Running ruff..."
ruff check moto tests
ruff format --check moto tests
2022-03-10 14:39:59 +00:00
@echo "Running pylint..."
2022-01-14 19:51:49 +00:00
pylint -j 0 moto tests
@echo "Running MyPy..."
mypy --install-types --non-interactive
2017-03-13 00:18:49 +00:00
format:
ruff format moto/ tests/
2024-03-15 19:51:25 +00:00
ruff check --fix moto/ tests/
test-only:
rm -f .coverage
rm -rf cover
pytest -sv -rs --cov=moto --cov-report xml ./tests/ $(TEST_EXCLUDE)
# https://github.com/aws/aws-xray-sdk-python/issues/196 - Run these tests separately without Coverage enabled
pytest -sv -rs ./tests/test_xray
MOTO_CALL_RESET_API=false pytest -sv --cov=moto --cov-report xml --cov-append -n 4 $(PARALLEL_TESTS) --dist loadscope
test: lint test-only
test_server:
@TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report xml ./tests/
aws_managed_policies:
scripts/update_managed_policies.py
implementation_coverage:
./scripts/implementation_coverage.py
git commit IMPLEMENTATION_COVERAGE.md -m "Updating implementation coverage" || true
cloudformation_coverage:
2023-04-11 14:31:46 +00:00
./scripts/cloudformation_coverage.py
git commit CLOUDFORMATION_COVERAGE.md -m "Updating CloudFormation coverage" || true
coverage: implementation_coverage cloudformation_coverage
scaffold:
@pip install -r requirements-dev.txt > /dev/null
2017-09-25 21:11:11 +00:00
exec python scripts/scaffold.py
int_test:
@./scripts/int_test.sh