2013-02-18 16:09:40 -05:00
|
|
|
SHELL := /bin/bash
|
|
|
|
|
2017-11-10 18:44:02 +09:00
|
|
|
ifeq ($(TEST_SERVER_MODE), true)
|
2020-09-04 20:14:48 +09:00
|
|
|
# exclude test_kinesisvideoarchivedmedia
|
|
|
|
# because testing with moto_server is difficult with data-endpoint
|
|
|
|
|
2021-02-01 05:15:57 -08:00
|
|
|
TEST_EXCLUDE := -k 'not test_kinesisvideoarchivedmedia'
|
2017-11-10 18:44:02 +09:00
|
|
|
else
|
|
|
|
TEST_EXCLUDE :=
|
|
|
|
endif
|
|
|
|
|
2013-02-18 16:09:40 -05:00
|
|
|
init:
|
2013-05-03 19:33:13 -04:00
|
|
|
@python setup.py develop
|
2019-07-08 20:42:24 -05:00
|
|
|
@pip install -r requirements-dev.txt
|
2013-02-18 16:09:40 -05:00
|
|
|
|
2017-03-12 20:18:49 -04:00
|
|
|
lint:
|
|
|
|
flake8 moto
|
2019-10-26 18:47:45 -07:00
|
|
|
black --check moto/ tests/
|
2017-03-12 20:18:49 -04:00
|
|
|
|
2020-12-03 18:32:06 +00:00
|
|
|
format:
|
|
|
|
black moto/ tests/
|
|
|
|
|
2019-10-26 18:47:45 -07:00
|
|
|
test-only:
|
2013-03-15 11:21:03 -04:00
|
|
|
rm -f .coverage
|
2016-03-31 13:33:13 -07:00
|
|
|
rm -rf cover
|
2021-01-26 12:37:03 +00:00
|
|
|
pytest -sv ./tests/ $(TEST_EXCLUDE)
|
|
|
|
|
|
|
|
test-coverage:
|
|
|
|
rm -f .coverage
|
|
|
|
rm -rf cover
|
|
|
|
pytest -sv --cov=moto --cov-report xml ./tests/ $(TEST_EXCLUDE)
|
2018-11-27 16:12:41 +00:00
|
|
|
|
2019-10-26 18:47:45 -07:00
|
|
|
test: lint test-only
|
|
|
|
|
2017-02-23 19:43:48 -05:00
|
|
|
test_server:
|
2021-02-02 18:01:00 +00:00
|
|
|
@TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report xml ./tests/
|
2017-02-23 19:43:48 -05:00
|
|
|
|
2017-09-19 14:01:08 -07:00
|
|
|
aws_managed_policies:
|
|
|
|
scripts/update_managed_policies.py
|
|
|
|
|
2017-09-22 10:12:45 -07:00
|
|
|
upload_pypi_artifact:
|
2019-11-14 15:10:54 -06:00
|
|
|
python setup.py sdist bdist_wheel
|
|
|
|
twine upload dist/*
|
2017-09-22 10:12:45 -07:00
|
|
|
|
2017-09-27 12:40:08 -07:00
|
|
|
push_dockerhub_image:
|
2020-11-28 17:10:38 -06:00
|
|
|
docker build -t motoserver/moto . --tag moto:`python setup.py --version`
|
2017-09-27 12:40:08 -07:00
|
|
|
docker push motoserver/moto
|
2017-09-22 10:12:45 -07:00
|
|
|
|
|
|
|
tag_github_release:
|
2017-09-07 12:07:08 -07:00
|
|
|
git tag `python setup.py --version`
|
|
|
|
git push origin `python setup.py --version`
|
2017-09-22 19:23:10 +09:00
|
|
|
|
2018-01-20 19:35:02 -08:00
|
|
|
publish: upload_pypi_artifact \
|
2017-10-27 14:15:38 +02:00
|
|
|
tag_github_release \
|
|
|
|
push_dockerhub_image
|
2017-09-23 17:29:18 +09:00
|
|
|
|
2017-10-25 12:28:18 +02:00
|
|
|
implementation_coverage:
|
2018-06-01 12:30:42 +02:00
|
|
|
./scripts/implementation_coverage.py
|
2017-11-20 12:13:44 -08:00
|
|
|
git commit IMPLEMENTATION_COVERAGE.md -m "Updating implementation coverage" || true
|
2017-10-25 12:28:18 +02:00
|
|
|
|
2017-09-22 19:23:10 +09:00
|
|
|
scaffold:
|
|
|
|
@pip install -r requirements-dev.txt > /dev/null
|
2017-09-25 14:11:11 -07:00
|
|
|
exec python scripts/scaffold.py
|
2020-09-13 16:08:23 +01:00
|
|
|
|
|
|
|
int_test:
|
|
|
|
@./scripts/int_test.sh
|