This commit is contained in:
James Pic 2016-06-15 19:50:30 +00:00 committed by GitHub
commit 89fc0dcacc
4 changed files with 49 additions and 6 deletions

7
.coveragerc Normal file
View File

@ -0,0 +1,7 @@
[paths]
source =
daphne/
[report]
omit =
.tox/*

View File

@ -1,9 +1,17 @@
sudo: false
language: python
python:
- "2.7"
- "3.5"
env:
global:
- PIP_RETRIES=10
- PIP_TIMEOUT=30
matrix:
- TOXENV=py27
- TOXENV=py35
install:
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install unittest2; fi
- pip install asgiref twisted autobahn
script: if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then python -m unittest2; else python -m unittest; fi
- travis_retry pip install tox codecov
script:
- tox
after_success:
- codecov

View File

@ -7,6 +7,9 @@ daphne
.. image:: https://img.shields.io/pypi/v/daphne.svg
:target: https://pypi.python.org/pypi/daphne
.. image:: https://codecov.io/github/andrewgodwin/daphne/coverage.svg?branch=master
:target: https://codecov.io/github/andrewgodwin/daphne?branch=master
Daphne is a HTTP, HTTP2 and WebSocket protocol server for
`ASGI <http://channels.readthedocs.org/en/latest/asgi.html>`_, and developed
to power Django Channels.

25
tox.ini Normal file
View File

@ -0,0 +1,25 @@
[tox]
envlist = py{27,35}
[base]
commands =
coverage report -m
[testenv]
usedevelop = true
commands =
coverage run -m unittest
{[base]commands}
deps =
asgiref
twisted
autobahn
coverage
[testenv:py27]
commands =
coverage run -m unittest2
{[base]commands}
deps =
unittest2
{[testenv]deps}