Merge pull request #234 from seemethere/update_tests_to_use_tox
Change travis job to use tox
This commit is contained in:
commit
f74d44152a
11
.travis.yml
11
.travis.yml
|
@ -1,15 +1,10 @@
|
||||||
|
sudo: false
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- '3.5'
|
- '3.5'
|
||||||
- '3.6'
|
- '3.6'
|
||||||
install:
|
install: pip install tox-travis
|
||||||
- pip install -r requirements.txt
|
script: tox
|
||||||
- pip install -r requirements-dev.txt
|
|
||||||
- python setup.py install
|
|
||||||
- pip install flake8
|
|
||||||
- pip install pytest
|
|
||||||
before_script: flake8 sanic
|
|
||||||
script: py.test -v tests
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: pypi
|
provider: pypi
|
||||||
user: channelcat
|
user: channelcat
|
||||||
|
|
25
tox.ini
25
tox.ini
|
@ -1,22 +1,21 @@
|
||||||
[tox]
|
[tox]
|
||||||
|
|
||||||
envlist = py35, py36
|
envlist = py35, py36, flake8
|
||||||
|
|
||||||
|
[travis]
|
||||||
|
|
||||||
|
python =
|
||||||
|
3.5: py35, flake8
|
||||||
|
3.6: py36, flake8
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
|
||||||
deps =
|
deps =
|
||||||
aiohttp
|
aiohttp
|
||||||
pytest
|
pytest
|
||||||
coverage
|
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
coverage run -m pytest -v tests {posargs}
|
pytest tests {posargs}
|
||||||
mv .coverage .coverage.{envname}
|
|
||||||
|
|
||||||
whitelist_externals =
|
|
||||||
coverage
|
|
||||||
mv
|
|
||||||
echo
|
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
deps =
|
deps =
|
||||||
|
@ -24,11 +23,3 @@ deps =
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
flake8 sanic
|
flake8 sanic
|
||||||
|
|
||||||
[testenv:report]
|
|
||||||
|
|
||||||
commands =
|
|
||||||
coverage combine
|
|
||||||
coverage report
|
|
||||||
coverage html
|
|
||||||
echo "Open file://{toxinidir}/coverage/index.html"
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user