GitHub Workflow (#21643)

* Fix tox.ini

* Update main.workflow

* Update tox.ini

* Update main.workflow

* Update main.workflow

* Update tox.ini

* Try only with one

* Update main.workflow

* Update main.workflow

* Update main.workflow

* Update main.workflow

* Update main.workflow
This commit is contained in:
Pascal Vizeli 2019-03-04 12:36:50 +01:00 committed by GitHub
parent 5c9f266672
commit c60627c699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 33 deletions

42
.github/main.workflow vendored
View File

@ -1,19 +1,43 @@
workflow "Tox" {
workflow "Python 3.7 - tox" {
on = "push"
resolves = ["Python 3.7", "Python 3.6", "Python 3.5"]
resolves = ["Python 3.7 - tests"]
}
action "Python 3.7" {
action "Python 3.7 - tests" {
uses = "home-assistant/actions/py37-tox@master"
args = "-e lint,pylint,typing,cov"
args = "-e py37"
}
action "Python 3.6" {
workflow "Python 3.6 - tox" {
on = "push"
resolves = ["Python 3.6 - tests"]
}
action "Python 3.6 - tests" {
uses = "home-assistant/actions/py36-tox@master"
args = "-e lint,pylint,typing"
args = "-e py36"
}
action "Python 3.5" {
uses = "home-assistant/actions/py35-tox@master"
args = "-e lint,pylint,typing"
workflow "Python 3.5 - tox" {
on = "push"
resolves = [
"Pyton 3.5 - typing,cov",
]
}
action "Python 3.5 - tests" {
uses = "home-assistant/actions/py35-tox@master"
args = "-e py35"
}
action "Python 3.5 - lints" {
uses = "home-assistant/actions/py35-tox@master"
needs = ["Python 3.5 - tests"]
args = "-e lint,pylint -p all"
}
action "Pyton 3.5 - typing,cov" {
uses = "home-assistant/actions/py35-tox@master"
args = "-e typing,cov -p all"
needs = ["Python 3.5 - lints"]
}

30
tox.ini
View File

@ -3,14 +3,7 @@ envlist = py35, py36, py37, py38, lint, pylint, typing, cov
skip_missing_interpreters = True
[testenv]
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}
basepython = {env:PYTHON3_PATH:python3}
commands =
pytest --timeout=9 --duration=10 {posargs}
{toxinidir}/script/check_dirty
@ -19,15 +12,6 @@ deps =
-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 =
pytest --timeout=9 --duration=10 --cov --cov-report= {posargs}
{toxinidir}/script/check_dirty
@ -36,7 +20,6 @@ deps =
-c{toxinidir}/homeassistant/package_constraints.txt
[testenv:pylint]
basepython = {env:PYTHON3_PATH:python3}
ignore_errors = True
deps =
-r{toxinidir}/requirements_all.txt
@ -46,18 +29,17 @@ commands =
pylint {posargs} homeassistant
[testenv:lint]
basepython = {env:PYTHON3_PATH:python3}
deps =
-r{toxinidir}/requirements_test.txt
commands =
python script/gen_requirements_all.py validate
flake8 {posargs}
pydocstyle {posargs:homeassistant tests}
python script/gen_requirements_all.py validate
flake8 {posargs}
pydocstyle {posargs:homeassistant tests}
[testenv:typing]
basepython = {env:PYTHON3_PATH:python3}
whitelist_externals=/bin/bash
deps =
-r{toxinidir}/requirements_test.txt
-c{toxinidir}/homeassistant/package_constraints.txt
commands =
/bin/bash -c 'mypy homeassistant/*.py homeassistant/{auth,util}/ homeassistant/helpers/{__init__,aiohttp_client,area_registry,condition,deprecation,dispatcher,entity_values,entityfilter,icon,intent,json,location,signal,state,sun,temperature,translation,typing}.py'
/bin/bash -c 'mypy homeassistant/*.py homeassistant/{auth,util}/ homeassistant/helpers/{__init__,aiohttp_client,area_registry,condition,deprecation,dispatcher,entity_values,entityfilter,icon,intent,json,location,signal,state,sun,temperature,translation,typing}.py'