Skip to content

Commit

Permalink
Merge pull request #9 from codingjoe/tox
Browse files Browse the repository at this point in the history
Adds tox
  • Loading branch information
codingjoe committed Oct 29, 2016
2 parents 5c13702 + 4fb7480 commit 3a613fe
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ matrix:
- env: DJANGO="-e git+https://github.com/django/django.git@master#egg=Django"
install:
- pip install --upgrade pip
- pip install .
- pip install -r requirements-dev.txt
- pip install $DJANGO
- pip install -U pytest pytest-django selenium
- pip install -U flake8 pep8-naming isort pep257
- pip install -U coveralls
- sh -e /etc/init.d/xvfb start
script:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ A lightweight file upload input for Django and Amazon S3.
[![Build Status](https://travis-ci.org/codingjoe/django-s3file.svg?branch=master)](https://travis-ci.org/codingjoe/django-s3file)
[![Code Health](https://landscape.io/github/codingjoe/django-s3file/master/landscape.svg?style=flat)](https://landscape.io/github/codingjoe/django-s3file/master)
[![Test Coverage](https://coveralls.io/repos/codingjoe/django-s3file/badge.svg?branch=master)](https://coveralls.io/r/codingjoe/django-s3file)
[![Code health](https://scrutinizer-ci.com/g/codingjoe/django-s3file/badges/quality-score.svg?b=master)](https://scrutinizer-ci.com/g/codingjoe/django-s3file/?branch=master)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/codingjoe/django-s3file/master/LICENSE)
[![Join the chat at https://gitter.im/codingjoe/django-s3file](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/codingjoe/django-s3file?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Expand Down
23 changes: 23 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# This file is autogenerated by pip-compile
# Make changes in requirements-dev.in, then run this to update:
#
# pip-compile requirements-dev.in
#
-e .
django-appconf==1.0.1
flake8==2.5.4
isort==4.2.2
mccabe==0.4.0 # via flake8
pep257==0.7.0
pep8-naming==0.3.3
pep8==1.7.0 # via flake8
pluggy==0.3.1 # via tox
py==1.4.31 # via pytest, tox
pyflakes==1.0.0 # via flake8
pytest-django==2.9.1
pytest==2.8.7
selenium==2.52.0
six==1.10.0 # via django-appconf
tox==2.3.1
virtualenv==14.0.6 # via tox
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
[pytest]
addopts = --tb=short -rxs
DJANGO_SETTINGS_MODULE=tests.testapp.settings
norecursedirs = env docs

[flake8]
max-line-length = 99
max-complexity = 10
statistics = true
show-source = true
exclude = */migrations/*,docs/*,env/*,.tox/*

[pep257]
add-ignore = D100,D102,D103,D104
match-dir = (?!tests|env|\.).*

[isort]
atomic = true
multi_line_output = 5
line_length = 79
skip = manage.py
skip = manage.py,.tox,env
known_first_party = s3file,tests
known_third_party = django
combine_as_imports = true
25 changes: 25 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[tox]
envlist = py{27,34,35}-django{18,19,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
commands=
py.test \
--basetemp={envtmpdir} \
--ignore=.tox \
{posargs}

[testenv:qa]
changedir={toxinidir}
deps=
-rrequirements-dev.txt
commands=
isort --check-only --recursive --diff {posargs}
flake8 --jobs=2 {posargs}
pep257 --verbose --explain --source --count {posargs}

0 comments on commit 3a613fe

Please sign in to comment.