Skip to content

Commit

Permalink
Add support for tox (DataDog#342)
Browse files Browse the repository at this point in the history
* Add support for tox

* drop 3.3
  • Loading branch information
ofek authored and David Bouchare committed Oct 25, 2019
1 parent 5c7e474 commit c1a85f7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 10 deletions.
38 changes: 28 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
dist: xenial
language: python
python:
- "2.7"
- "pypy"
- "3.3"
- "3.4"
- "3.5"
- "3.6"

cache:
directories:
- $HOME/.cache/pip

branches:
only:
- master

matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35,flake8
- python: 3.6
env: TOXENV=py36
- python: pypy
env: TOXENV=pypy
# PyPy isn't yet available on Xenial
dist: trusty

install:
- pip install flake8==3.4.1
- pip install tox

script:
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then flake8 --max-line-length=100 datadog; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then python -Wall setup.py test; else python -Wall setup.py test -s tests.unit; fi
- tox
25 changes: 25 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[tox]
minversion = 3.7.0
skip_missing_interpreters = true
envlist =
py{27,33,34,35,36,py}
flake8

[testenv]
usedevelop = true
deps =
mock
nose
commands = python -Wall setup.py test -s tests.unit

[testenv:py27]
commands = python -Wall setup.py test

[testenv:flake8]
skip_install = true
deps =
flake8==3.4.1
commands = flake8 datadog

[flake8]
max-line-length = 100

0 comments on commit c1a85f7

Please sign in to comment.