map travis-ci matrix to tox environments

This commit is contained in:
Daniel Graña 2013-11-07 04:02:46 -02:00
parent bc7fa61136
commit fabb351097
6 changed files with 36 additions and 48 deletions

View File

@ -1,26 +1,21 @@
language: python
python: 2.7
env:
TRAVISBUG="#1027"
- TOX_ENV=py27
- TOX_ENV=precise
- TOX_ENV=trunk
- TOX_ENV=pypy
matrix:
exclude:
- env: TRAVISBUG="#1027"
include:
- python: "2.7"
env: BUILDENV=precise
- python: "2.7"
env: BUILDENV=latest
- python: "2.7"
env: BUILDENV=trunk
- python: "pypy"
env: BUILDENV=latest
allow_failures:
- python: "pypy"
env: BUILDENV=latest
- env: TOX_ENV=pypy
install:
- pip install --use-mirrors -r .travis/requirements-$BUILDENV.txt
- pip install --use-mirrors .
- pip install -M tox
script:
- trial scrapy
- tox -e $TOX_ENV
notifications:
irc:
channels:

View File

@ -1,9 +0,0 @@
pyOpenSSL
lxml
twisted
boto
Pillow
django
# testing requirements
mock

View File

@ -1,10 +0,0 @@
# travis workers uses openssl 1.0 that fails for pyOpenSSL < 0.13
pyOpenSSL==0.13
lxml==2.3.2
twisted==11.1.0
boto==2.2.2
Pillow<2.0
django==1.3.1
# testing requirements
mock==1.0.1

View File

@ -1,3 +0,0 @@
-r requirements-latest.txt
git+https://github.com/scrapy/w3lib#egg=w3lib
git+https://github.com/scrapy/queuelib#egg=queuelib

View File

@ -1,6 +1,6 @@
Twisted>=10.0.0
w3lib>=1.2
queuelib
lxml
pyOpenSSL
cssselect>=0.9
w3lib>=1.2
queuelib

29
tox.ini
View File

@ -4,25 +4,40 @@
# and then run "tox" from this directory.
[tox]
envlist = py27, precise, trunk
envlist = py27, pypy, precise, trunk
[testenv]
deps =
-r{toxinidir}/.travis/requirements-latest.txt
-rrequirements.txt
# Extras
boto
Pillow
django
# Only required to run tests
mock
commands =
{toxinidir}/bin/runtests.sh []
trial scrapy
[testenv:precise]
basepython = python2.7
deps =
-r{toxinidir}/.travis/requirements-precise.txt
pyOpenSSL==0.13
lxml==2.3.2
twisted==11.1.0
boto==2.2.2
Pillow<2.0
django==1.3.1
cssselect==0.9.1
mock==1.0.1
[testenv:trunk]
basepython = python2.7
deps =
-r{toxinidir}/.travis/requirements-trunk.txt
commands =
pip install https://github.com/scrapy/w3lib/archive/master.zip#egg=w3lib
pip install https://github.com/scrapy/queuelib/archive/master.zip#egg=queuelib
trial scrapy
[testenv:windows]
commands =
{toxinidir}/bin/runtests.bat []
bin/runtests.bat []
sitepackages = False