24b04b6b70
https://docs.travis-ci.com/user/reference/overview/#deprecated-virtualization-environments https://blog.travis-ci.com/2019-08-27-deployment-tooling-dpl-v2-preview-release > skip_cleanup is now deprecated, and cleanup is false by default. The default used to be true, so you had to opt out using skip_cleanup … and has been used a lot. Cleaning up the working directory from any left over build artifacts only made sense for few providers, so we have changed this default.
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
dist: xenial
|
|
language: python
|
|
services:
|
|
- docker
|
|
python:
|
|
- 2.7
|
|
- 3.6
|
|
- 3.7
|
|
- 3.8
|
|
env:
|
|
- TEST_SERVER_MODE=false
|
|
- TEST_SERVER_MODE=true
|
|
before_install:
|
|
- export BOTO_CONFIG=/dev/null
|
|
install:
|
|
- |
|
|
python setup.py sdist
|
|
|
|
if [ "$TEST_SERVER_MODE" = "true" ]; then
|
|
if [ "$TRAVIS_PYTHON_VERSION" = "3.8" ]; then
|
|
# Python 3.8 does not provide Stretch images yet [1]
|
|
# [1] https://github.com/docker-library/python/issues/428
|
|
PYTHON_DOCKER_TAG=${TRAVIS_PYTHON_VERSION}-buster
|
|
else
|
|
PYTHON_DOCKER_TAG=${TRAVIS_PYTHON_VERSION}-stretch
|
|
fi
|
|
docker run --rm -t --name motoserver -e TEST_SERVER_MODE=true -e AWS_SECRET_ACCESS_KEY=server_secret -e AWS_ACCESS_KEY_ID=server_key -v `pwd`:/moto -p 5000:5000 -v /var/run/docker.sock:/var/run/docker.sock python:${PYTHON_DOCKER_TAG} /moto/travis_moto_server.sh &
|
|
fi
|
|
travis_retry pip install boto==2.45.0
|
|
travis_retry pip install boto3
|
|
travis_retry pip install dist/moto*.gz
|
|
travis_retry pip install coveralls==1.1
|
|
travis_retry pip install -r requirements-dev.txt
|
|
|
|
if [ "$TEST_SERVER_MODE" = "true" ]; then
|
|
python wait_for.py
|
|
fi
|
|
script:
|
|
- make test-only
|
|
- if [[ $TRAVIS_PYTHON_VERSION == "3.7" ]]; then make lint; fi
|
|
after_success:
|
|
- coveralls
|
|
before_deploy:
|
|
- git checkout $TRAVIS_BRANCH
|
|
- git fetch --unshallow
|
|
- python update_version_from_git.py
|
|
deploy:
|
|
- provider: pypi
|
|
distributions: sdist bdist_wheel
|
|
user: spulec
|
|
password:
|
|
secure: NxnPylnTfekJmGyoufCw0lMoYRskSMJzvAIyAlJJVYKwEhmiCPOrdy5qV8i8mRZ1AkUsqU3jBZ/PD56n96clHW0E3d080UleRDj6JpyALVdeLfMqZl9kLmZ8bqakWzYq3VSJKw2zGP/L4tPGf8wTK1SUv9yl/YNDsBdCkjDverw=
|
|
on:
|
|
branch:
|
|
- master
|
|
cleanup: false
|
|
skip_existing: true
|
|
# - provider: pypi
|
|
# distributions: sdist bdist_wheel
|
|
# user: spulec
|
|
# password:
|
|
# secure: NxnPylnTfekJmGyoufCw0lMoYRskSMJzvAIyAlJJVYKwEhmiCPOrdy5qV8i8mRZ1AkUsqU3jBZ/PD56n96clHW0E3d080UleRDj6JpyALVdeLfMqZl9kLmZ8bqakWzYq3VSJKw2zGP/L4tPGf8wTK1SUv9yl/YNDsBdCkjDverw=
|
|
# on:
|
|
# tags: true
|
|
# skip_existing: true
|