moto/Makefile

70 lines
1.5 KiB
Makefile
Raw Normal View History

2013-02-18 21:09:40 +00:00
SHELL := /bin/bash
ifeq ($(TEST_SERVER_MODE), true)
# exclude test_iot and test_iotdata for now
# because authentication of iot is very complicated
# exclude test_kinesisvideoarchivedmedia
# because testing with moto_server is difficult with data-endpoint
2020-10-06 06:04:09 +00:00
TEST_EXCLUDE := -k 'not (test_iot or test_kinesisvideoarchivedmedia)'
else
TEST_EXCLUDE :=
endif
2013-02-18 21:09:40 +00:00
init:
@python setup.py develop
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:
flake8 moto
black --check moto/ tests/
2017-03-13 00:18:49 +00:00
format:
black moto/ tests/
test-only:
rm -f .coverage
rm -rf cover
pytest -sv ./tests/ $(TEST_EXCLUDE)
test-coverage:
rm -f .coverage
rm -rf cover
pytest -sv --cov=moto --cov-report xml ./tests/ $(TEST_EXCLUDE)
test: lint test-only
test_server:
2020-10-06 06:04:09 +00:00
@TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report html ./tests/
aws_managed_policies:
scripts/update_managed_policies.py
2017-09-22 17:12:45 +00:00
upload_pypi_artifact:
2019-11-14 21:10:54 +00:00
python setup.py sdist bdist_wheel
twine upload dist/*
2017-09-22 17:12:45 +00:00
2017-09-27 19:40:08 +00:00
push_dockerhub_image:
2020-11-28 23:10:38 +00:00
docker build -t motoserver/moto . --tag moto:`python setup.py --version`
2017-09-27 19:40:08 +00:00
docker push motoserver/moto
2017-09-22 17:12:45 +00:00
tag_github_release:
2017-09-07 19:07:08 +00:00
git tag `python setup.py --version`
git push origin `python setup.py --version`
2018-01-21 03:35:02 +00:00
publish: upload_pypi_artifact \
tag_github_release \
push_dockerhub_image
implementation_coverage:
./scripts/implementation_coverage.py
git commit IMPLEMENTATION_COVERAGE.md -m "Updating implementation coverage" || true
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