Compare commits

...

8 Commits

Author SHA1 Message Date
Stefan Wojcik
1178ae262b Truly test pymongo v2.8 instead of v2.9.
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.
2017-02-25 16:18:20 -05:00
Stefan Wojcik
4c629e46ce Drop pymongo dev tests to speed things up.
We don't need to test it before a stable release and removing it shaves off
considerable amount of time from Travis builds.
2017-02-25 16:06:19 -05:00
Stefan Wojcik
2d429e3703 use mongodb v2.6 bcos pymongo 2.7 doesnt work w/ mongodb v3.0 2017-02-25 15:49:28 -05:00
Stefan Wojcik
06cb866f82 tox.ini cleanup 2017-02-25 14:07:58 -05:00
Stefan Wojcik
e9caaa916c try freezing mongodb at the latest v3.0 2017-02-19 18:20:41 -05:00
Stefan Wojcik
4e91c4f5bc use apt addons vs sudo apt-get install 2017-02-19 18:02:30 -05:00
Stefan Wojcik
4068a6b36b cache pip dependencies 2017-02-19 17:59:37 -05:00
Stefan Wojcik
d096d2ec38 run Travis builds in a container-based environment 2017-02-19 17:49:05 -05:00
2 changed files with 45 additions and 15 deletions

View File

@ -1,3 +1,6 @@
# Use a container-based environment
sudo: false
language: python
python:
@ -8,26 +11,41 @@ python:
- pypy
- pypy3
# Test on PyMongo v2.7.x, v2.8.x, and v3.x
env:
- PYMONGO=2.7
- PYMONGO=2.8
- PYMONGO=3.0
- PYMONGO=dev
matrix:
fast_finish: true
before_install:
- travis_retry sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
- echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' |
sudo tee /etc/apt/sources.list.d/mongodb.list
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install mongodb-org-server
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:
- sudo apt-get install 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
- travis_retry pip install --upgrade pip
- travis_retry pip install coveralls
- travis_retry pip install flake8
@ -35,6 +53,9 @@ install:
- 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
@ -45,7 +66,7 @@ script:
# 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_script:
after_success:
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then coveralls --verbose; fi
notifications:
@ -56,11 +77,22 @@ branches:
- 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

View File

@ -1,5 +1,5 @@
[tox]
envlist = {py26,py27,py33,py34,py35,pypy,pypy3}-{mg27,mg28},flake8
envlist = {py27,py33,py34,py35,pypy,pypy3}-{mg27,mg28,mg30},flake8
[testenv]
commands =
@ -7,12 +7,10 @@ commands =
deps =
nose
mg27: PyMongo<2.8
mg28: PyMongo>=2.8,<3.0
mg28: PyMongo>=2.8,<2.9
mg30: PyMongo>=3.0
mgdev: https://github.com/mongodb/mongo-python-driver/tarball/master
setenv =
PYTHON_EGG_CACHE = {envdir}/python-eggs
passenv = windir
[testenv:flake8]
deps =