Try to fix coveralls unstable result (#15800)
* Create one tox env for code coverage report pytest-cov generated report in project root folder, not tox env folder. * Add cov tox env to travis * Coveralls seems expecting all build jobs upload * Only upload coverage after cov env successpull/15857/head
parent
12e69202f8
commit
8ef2cfa364
|
@ -13,7 +13,8 @@ matrix:
|
||||||
- python: "3.5.3"
|
- python: "3.5.3"
|
||||||
env: TOXENV=typing
|
env: TOXENV=typing
|
||||||
- python: "3.5.3"
|
- python: "3.5.3"
|
||||||
env: TOXENV=py35
|
env: TOXENV=cov
|
||||||
|
after_success: coveralls
|
||||||
- python: "3.6"
|
- python: "3.6"
|
||||||
env: TOXENV=py36
|
env: TOXENV=py36
|
||||||
- python: "3.7"
|
- python: "3.7"
|
||||||
|
@ -45,4 +46,3 @@ deploy:
|
||||||
on:
|
on:
|
||||||
branch: dev
|
branch: dev
|
||||||
condition: $TOXENV = lint
|
condition: $TOXENV = lint
|
||||||
after_success: coveralls
|
|
||||||
|
|
18
tox.ini
18
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py35, py36, py37, py38, lint, pylint, typing
|
envlist = py35, py36, py37, py38, lint, pylint, typing, cov
|
||||||
skip_missing_interpreters = True
|
skip_missing_interpreters = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
@ -11,6 +11,22 @@ setenv =
|
||||||
; fail.
|
; fail.
|
||||||
whitelist_externals = /usr/bin/env
|
whitelist_externals = /usr/bin/env
|
||||||
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
|
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
|
||||||
|
commands =
|
||||||
|
pytest --timeout=9 --duration=10 {posargs}
|
||||||
|
deps =
|
||||||
|
-r{toxinidir}/requirements_test_all.txt
|
||||||
|
-c{toxinidir}/homeassistant/package_constraints.txt
|
||||||
|
|
||||||
|
[testenv:cov]
|
||||||
|
basepython = {env:PYTHON3_PATH:python3}
|
||||||
|
setenv =
|
||||||
|
PYTHONPATH = {toxinidir}:{toxinidir}/homeassistant
|
||||||
|
; both temper-python and XBee modules have utf8 in their README files
|
||||||
|
; which get read in from setup.py. If we don't force our locale to a
|
||||||
|
; utf8 one, tox's env is reset. And the install of these 2 packages
|
||||||
|
; fail.
|
||||||
|
whitelist_externals = /usr/bin/env
|
||||||
|
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
|
||||||
commands =
|
commands =
|
||||||
pytest --timeout=9 --duration=10 --cov --cov-report= {posargs}
|
pytest --timeout=9 --duration=10 --cov --cov-report= {posargs}
|
||||||
deps =
|
deps =
|
||||||
|
|
Loading…
Reference in New Issue