48df5bd5af
* Add format command to makefile * Refactor executions to be a attribute of StateMachine * Begin to add tests for execution history * Add tests for failed and successful event histories, with implementations * Add failure case to environment var check * Skip test if in server mode and update implementation coverage * Add conditional import for mock to cover python 2 * Refactor stop execution logic into StateMachine * Refactor event history environment variable into settings.py * Remove typing and os import
65 lines
1.4 KiB
Makefile
65 lines
1.4 KiB
Makefile
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
|
|
|
|
TEST_EXCLUDE := -k 'not (test_iot or test_kinesisvideoarchivedmedia)'
|
|
else
|
|
TEST_EXCLUDE :=
|
|
endif
|
|
|
|
init:
|
|
@python setup.py develop
|
|
@pip install -r requirements-dev.txt
|
|
|
|
lint:
|
|
flake8 moto
|
|
black --check moto/ tests/
|
|
|
|
format:
|
|
black moto/ tests/
|
|
|
|
test-only:
|
|
rm -f .coverage
|
|
rm -rf cover
|
|
@pytest -sv --cov=moto --cov-report html ./tests/ $(TEST_EXCLUDE)
|
|
|
|
test: lint test-only
|
|
|
|
test_server:
|
|
@TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report html ./tests/
|
|
|
|
aws_managed_policies:
|
|
scripts/update_managed_policies.py
|
|
|
|
upload_pypi_artifact:
|
|
python setup.py sdist bdist_wheel
|
|
twine upload dist/*
|
|
|
|
push_dockerhub_image:
|
|
docker build -t motoserver/moto . --tag moto:`python setup.py --version`
|
|
docker push motoserver/moto
|
|
|
|
tag_github_release:
|
|
git tag `python setup.py --version`
|
|
git push origin `python setup.py --version`
|
|
|
|
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
|
|
exec python scripts/scaffold.py
|
|
|
|
int_test:
|
|
@./scripts/int_test.sh
|