Testing v2.9 was unexpected and it's not as important given v2.9 mostly mostly just provided an upgrade path for v3.0, and we already test v3.x.
99 lines
2.5 KiB
YAML
99 lines
2.5 KiB
YAML
# Use a container-based environment
|
|
sudo: false
|
|
|
|
language: python
|
|
|
|
python:
|
|
- '2.7'
|
|
- '3.3'
|
|
- '3.4'
|
|
- '3.5'
|
|
- pypy
|
|
- pypy3
|
|
|
|
# Test on PyMongo v2.7.x, v2.8.x, and v3.x
|
|
env:
|
|
- PYMONGO=2.7
|
|
- PYMONGO=2.8
|
|
- PYMONGO=3.0
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
|
|
services:
|
|
- mongodb
|
|
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- mongodb-upstart
|
|
packages:
|
|
- mongodb-org-server=2.6.9
|
|
|
|
# Optional dependencies for the ImageField and others
|
|
- python-dev
|
|
- python3-dev
|
|
- libopenjpeg-dev
|
|
- zlib1g-dev
|
|
- libjpeg-turbo8-dev
|
|
- libtiff4-dev
|
|
- libjpeg8-dev
|
|
- libfreetype6-dev
|
|
- liblcms2-dev
|
|
- libwebp-dev
|
|
- tcl8.5-dev
|
|
- tk8.5-dev
|
|
- python-tk
|
|
|
|
install:
|
|
- travis_retry pip install --upgrade pip
|
|
- travis_retry pip install coveralls
|
|
- travis_retry pip install flake8
|
|
- travis_retry pip install tox>=1.9
|
|
- travis_retry pip install "virtualenv<14.0.0" # virtualenv>=14.0.0 has dropped Python 3.2 support (and pypy3 is based on py32)
|
|
- travis_retry tox -e $(echo py$TRAVIS_PYTHON_VERSION-mg$PYMONGO | tr -d . | sed -e 's/pypypy/pypy/') -- -e test
|
|
|
|
# Cache dependencies installed via pip
|
|
cache: pip
|
|
|
|
# Run flake8 for py27
|
|
before_script:
|
|
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then tox -e flake8; fi
|
|
|
|
script:
|
|
- tox -e $(echo py$TRAVIS_PYTHON_VERSION-mg$PYMONGO | tr -d . | sed -e 's/pypypy/pypy/') -- --with-coverage
|
|
|
|
# For now only submit coveralls for Python v2.7. Python v3.x currently shows
|
|
# 0% coverage. That's caused by 'use_2to3', which builds the py3-compatible
|
|
# code in a separate dir and runs tests on that.
|
|
after_success:
|
|
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then coveralls --verbose; fi
|
|
|
|
notifications:
|
|
irc: irc.freenode.org#mongoengine
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^v.*$/
|
|
|
|
# Whenever a new release is created via GitHub, publish it on PyPI.
|
|
deploy:
|
|
provider: pypi
|
|
user: the_drow
|
|
password:
|
|
secure: QMyatmWBnC6ZN3XLW2+fTBDU4LQcp1m/LjR2/0uamyeUzWKdlOoh/Wx5elOgLwt/8N9ppdPeG83ose1jOz69l5G0MUMjv8n/RIcMFSpCT59tGYqn3kh55b0cIZXFT9ar+5cxlif6a5rS72IHm5li7QQyxexJIII6Uxp0kpvUmek=
|
|
|
|
# create a source distribution and a pure python wheel for faster installs
|
|
distributions: "sdist bdist_wheel"
|
|
|
|
# only deploy on tagged commits (aka GitHub releases) and only for the
|
|
# parent repo's builds running Python 2.7 along with dev PyMongo (we run
|
|
# Travis against many different Python and PyMongo versions and we don't
|
|
# want the deploy to occur multiple times).
|
|
on:
|
|
tags: true
|
|
repo: MongoEngine/mongoengine
|
|
condition: "$PYMONGO = 3.0"
|
|
python: 2.7
|