use tox for ci
This commit is contained in:
parent
00c2fb2192
commit
2cb2148ddc
5 changed files with 36 additions and 6 deletions
11
.travis.yml
11
.travis.yml
|
@ -1,5 +1,10 @@
|
||||||
|
sudo: false
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "2.7"
|
- 2.7
|
||||||
install: pip install -r requirements-dev.txt
|
- 3.7
|
||||||
script: python setup.py install && pytest tests/unit-tests.py -x -s -v
|
env:
|
||||||
|
- TOXENV=py-normal
|
||||||
|
|
||||||
|
install: pip install tox
|
||||||
|
script: tox
|
||||||
|
|
|
@ -6,3 +6,6 @@ pep8-naming
|
||||||
autoflake
|
autoflake
|
||||||
mccabe
|
mccabe
|
||||||
yapf
|
yapf
|
||||||
|
tox
|
||||||
|
coverage
|
||||||
|
pytest-cov
|
||||||
|
|
14
setup.cfg
14
setup.cfg
|
@ -26,3 +26,17 @@ no_spaces_around_selected_binary_operators = false
|
||||||
split_penalty_import_names = 500
|
split_penalty_import_names = 500
|
||||||
join_multiple_lines = true
|
join_multiple_lines = true
|
||||||
|
|
||||||
|
[coverage:run]
|
||||||
|
omit =
|
||||||
|
tests/*
|
||||||
|
src/*
|
||||||
|
setup.py
|
||||||
|
.tox/*
|
||||||
|
dist/*
|
||||||
|
**/celeryconfig.py
|
||||||
|
**/constants.py
|
||||||
|
**/migrations/*
|
||||||
|
**/__init__.py
|
||||||
|
app.py
|
||||||
|
**/env.py
|
||||||
|
**/urls.py
|
||||||
|
|
|
@ -9,9 +9,6 @@ import os
|
||||||
|
|
||||||
from mega import Mega
|
from mega import Mega
|
||||||
|
|
||||||
email = os.environ['EMAIL']
|
|
||||||
password = os.environ['PASS']
|
|
||||||
|
|
||||||
mega = Mega()
|
mega = Mega()
|
||||||
# anonymous login
|
# anonymous login
|
||||||
m = mega.login()
|
m = mega.login()
|
11
tox.ini
Normal file
11
tox.ini
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[tox]
|
||||||
|
envlist = py{27,37}-normal,lint
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
commands =
|
||||||
|
flake8 {toxinidir}/src/
|
||||||
|
coverage erase
|
||||||
|
PYTHONPATH=. pytest --cov=. {toxinidir}/tests/tests.py
|
||||||
|
|
||||||
|
deps =
|
||||||
|
-rrequirements-dev.txt
|
Loading…
Reference in a new issue