2013-03-01 03:32:52 +00:00
|
|
|
language: python
|
2014-12-28 13:37:13 +00:00
|
|
|
sudo: false
|
2017-09-27 23:04:58 +00:00
|
|
|
services:
|
|
|
|
- docker
|
2013-03-01 03:32:52 +00:00
|
|
|
python:
|
|
|
|
- 2.7
|
2017-03-07 02:48:22 +00:00
|
|
|
- 3.6
|
2013-07-09 01:18:19 +00:00
|
|
|
env:
|
2017-02-27 04:40:54 +00:00
|
|
|
- TEST_SERVER_MODE=false
|
2017-02-27 04:56:50 +00:00
|
|
|
- TEST_SERVER_MODE=true
|
2018-07-24 13:14:52 +00:00
|
|
|
# Due to incomplete Python 3.7 support on Travis CI (
|
|
|
|
# https://github.com/travis-ci/travis-ci/issues/9815),
|
|
|
|
# using a matrix is necessary
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- python: 3.7
|
|
|
|
env: TEST_SERVER_MODE=false
|
|
|
|
dist: xenial
|
|
|
|
sudo: true
|
|
|
|
- python: 3.7
|
|
|
|
env: TEST_SERVER_MODE=true
|
|
|
|
dist: xenial
|
|
|
|
sudo: true
|
2017-09-27 23:04:58 +00:00
|
|
|
before_install:
|
|
|
|
- export BOTO_CONFIG=/dev/null
|
2013-03-01 03:32:52 +00:00
|
|
|
install:
|
2017-09-27 23:04:58 +00:00
|
|
|
# We build moto first so the docker container doesn't try to compile it as well, also note we don't use
|
|
|
|
# -d for docker run so the logs show up in travis
|
|
|
|
# Python images come from here: https://hub.docker.com/_/python/
|
2017-02-27 05:02:23 +00:00
|
|
|
- |
|
2017-09-27 23:04:58 +00:00
|
|
|
python setup.py sdist
|
|
|
|
|
2017-02-27 05:02:23 +00:00
|
|
|
if [ "$TEST_SERVER_MODE" = "true" ]; then
|
2017-09-27 23:04:58 +00:00
|
|
|
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:${TRAVIS_PYTHON_VERSION}-stretch /moto/travis_moto_server.sh &
|
2017-02-27 05:17:01 +00:00
|
|
|
export AWS_SECRET_ACCESS_KEY=foobar_secret
|
|
|
|
export AWS_ACCESS_KEY_ID=foobar_key
|
2017-02-27 05:02:23 +00:00
|
|
|
fi
|
2017-09-27 23:04:58 +00:00
|
|
|
travis_retry pip install boto==2.45.0
|
|
|
|
travis_retry pip install boto3
|
|
|
|
travis_retry pip install dist/moto*.gz
|
2017-10-08 03:46:26 +00:00
|
|
|
travis_retry pip install coveralls==1.1
|
2017-09-27 23:04:58 +00:00
|
|
|
travis_retry pip install -r requirements-dev.txt
|
|
|
|
|
|
|
|
if [ "$TEST_SERVER_MODE" = "true" ]; then
|
|
|
|
python wait_for.py
|
|
|
|
fi
|
2013-03-11 02:34:30 +00:00
|
|
|
script:
|
2013-03-11 02:38:18 +00:00
|
|
|
- make test
|
2013-03-11 02:34:30 +00:00
|
|
|
after_success:
|
2013-06-27 04:04:05 +00:00
|
|
|
- coveralls
|