Skip to content

Commit

Permalink
Merge pull request #68 from resulto-admin/ISSUE-67
Browse files Browse the repository at this point in the history
Added tox support. closes #67
  • Loading branch information
richleland committed Feb 28, 2016
2 parents 4d19146 + 06dd4e8 commit 7df5a21
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ python:
- "2.7"
- "3.4"
env:
- DJANGO_VERSION=1.7
- DJANGO_VERSION=1.8
- DJANGO_VERSION=1.9b1
- DJANGO_VERSION='>=1.7,<1.8'
- DJANGO_VERSION='>=1.8,<1.9'
- DJANGO_VERSION='>=1.9,<1.10'
install:
- pip install -r dev-requirements.txt
- pip uninstall django --yes
- pip install -q django==$DJANGO_VERSION
- pip install -q django$DJANGO_VERSION
- pip install coveralls
- pip install -e .
before_script:
Expand Down
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ Once you are set up for local development:
* Run ``make test`` to test against your current Python environment
* Open htmlcov/index.html to view coverage information

### Testing all version combinations

You can also test all the supported Python and dependencies versions with tox:

1. Install tox: ``pip install tox``
2. Run tox: ``tox``

If you do not have Python 2.7, 3.4, and 3.5, you can install them with pyenv:

1. Install [pyenv](https://github.com/yyuu/pyenv)
2. Install the required versions of Python:
1. ``pyenv install 2.7.11``
2. ``pyenv install 3.4.4``
3. ``pyenv install 3.5.1``
3. Set the global versions: ``pyenv global 2.7.11 3.4.4 3.5.1``
4. Run tox: ``tox``

## Releasing

To put python-sparkpost on PyPI
Expand Down
8 changes: 2 additions & 6 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
flake8
pytest==2.6.4
pytest-cov==1.8.1
requests==2.5.1
responses==0.3.0
-r test-requirements.txt
wheel
twine
Django>=1.8,<1.9
Django>=1.7,<1.10
5 changes: 5 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
flake8
pytest==2.8.7
pytest-cov==1.8.1
requests==2.5.1
responses==0.3.0
17 changes: 17 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tox]
envlist = {py27,py34}-django{17,18}, py35-django{18,19}

[testenv]
deps =
-rtest-requirements.txt
django17: Django>=1.7,<1.8
django18: Django>=1.8,<1.9
django19: Django>=1.9,<1.10

commands = py.test test/

[testenv:py35-django19]

commands =
flake8 sparkpost test
py.test --cov-report term-missing --cov-report html --cov sparkpost test/

0 comments on commit 7df5a21

Please sign in to comment.