Skip to content

Commit

Permalink
Merge d229996 into 9b15fd2
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Dec 28, 2016
2 parents 9b15fd2 + d229996 commit 1856a95
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 23 deletions.
38 changes: 26 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
language: python
sudo: false
dist: trusty
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
cache:
- pip
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
env:
global:
- DISPLAY=:99.0
matrix:
- DJANGO="Django<1.9,>=1.8"
- DJANGO="Django<1.10,>=1.9"
- DJANGO="-e git+https://github.com/django/django.git@master#egg=Django"
- TOXENV=qa
- DJANGO=18
- DJANGO=19
- DJANGO=110
- DJANGO=master
matrix:
fast_finish: true
allow_failures:
- env: DJANGO="-e git+https://github.com/django/django.git@master#egg=Django"
- env: DJANGO=master
install:
- pip install --upgrade pip
- pip install -r requirements-dev.txt
- pip install $DJANGO
- pip install --upgrade pip tox
- pip install -U coveralls
- sh -e /etc/init.d/xvfb start
before_script:
- mkdir bin
- curl -O https://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip -d bin
- PATH=$PATH:$PWD/bin
script:
- isort --check-only --recursive --diff .
- flake8 --jobs=2 .
- pep257 s3file
- coverage run --source=s3file -m 'pytest'
- |
if [[ $TOXENV == qa ]]; then
tox -e qa
else
tox -e py$(echo $TRAVIS_PYTHON_VERSION | sed -e 's/\.//g')-dj$DJANGO
fi
after_success:
- coveralls
6 changes: 2 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@
# pip-compile requirements-dev.in
#
-e .
coverage==4.3
django-appconf==1.0.2
flake8==3.2.1
isort==4.2.5
mccabe==0.5.3 # via flake8
pep257==0.7.0
pep8-naming==0.4.1
pep8==1.7.0 # via flake8
pluggy==0.4.0 # via tox
py==1.4.32 # via pytest, tox
py==1.4.32 # via pytest
pyflakes==1.3.0 # via flake8
pytest-django==3.1.2
pytest==3.0.5
selenium==3.0.2
six==1.10.0 # via django-appconf
tox==2.5.0
virtualenv==15.1.0 # via tox
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[pytest]
[tool:pytest]
addopts = --tb=short -rxs
DJANGO_SETTINGS_MODULE=tests.testapp.settings
norecursedirs = env docs
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import pytest
from django.core.files.base import ContentFile
from django.utils.encoding import force_text
from selenium import webdriver
from selenium.common.exceptions import WebDriverException

Expand All @@ -24,7 +25,7 @@ def driver(request):
try:
b = browsers[request.param]()
except WebDriverException as e:
pytest.skip(e)
pytest.skip(force_text(e))
else:
b.set_window_size(1200, 800)
request.addfinalizer(lambda *args: b.quit())
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
[tox]
envlist = py{27,34,35}-django{18,19,master},qa
envlist = py{27,35,36}-dj{18,19,110,master},qa
[testenv]
setenv=
DISPLAY=:99.0
PYTHONPATH = {toxinidir}
deps=
-rrequirements-dev.txt
django18: Django>=1.8,<1.9
django19: Django>=1.9,<1.10
djangomaster: -egit+https://github.com/django/django.git@master#egg=Django
dj18: https://github.com/django/django/archive/stable/1.8.x.tar.gz#egg=django
dj19: https://github.com/django/django/archive/stable/1.9.x.tar.gz#egg=django
dj110: https://github.com/django/django/archive/stable/1.10.x.tar.gz#egg=django
djmaster: https://github.com/django/django/archive/master.tar.gz#egg=django
commands=
py.test \
coverage run --source=s3file -m 'pytest' \
--basetemp={envtmpdir} \
--ignore=.tox \
{posargs}
Expand Down

0 comments on commit 1856a95

Please sign in to comment.