tox: Consolidate 'isort' and 'yapf' environments for Python2 and Python3
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>merge-requests/381/head
parent
826f7bbe9f
commit
811b3a8a8f
|
@ -15,20 +15,20 @@ static_js_css:
|
|||
when: always
|
||||
paths:
|
||||
- db/static/lib
|
||||
static_python:
|
||||
static:
|
||||
stage: static
|
||||
image: python:2
|
||||
before_script:
|
||||
- pip install tox~=3.8.0
|
||||
script:
|
||||
- tox -e "py2-{flake8,isort,yapf}"
|
||||
static_python3:
|
||||
- tox -e "py2-flake8,isort,yapf"
|
||||
static3:
|
||||
stage: static
|
||||
image: python:3
|
||||
before_script:
|
||||
- pip install tox~=3.8.0
|
||||
script:
|
||||
- tox -e "py3-{flake8,isort,yapf}"
|
||||
- tox -e "py3-flake8"
|
||||
docs:
|
||||
stage: build
|
||||
image: python:2
|
||||
|
@ -74,7 +74,14 @@ test:
|
|||
before_script:
|
||||
- pip install tox~=3.8.0
|
||||
script:
|
||||
- tox -e deps,pytest
|
||||
- tox -e deps,py2-pytest
|
||||
test3:
|
||||
stage: test
|
||||
image: python:3
|
||||
before_script:
|
||||
- pip install tox~=3.8.0
|
||||
script:
|
||||
- tox -e deps,py3-pytest
|
||||
docker:
|
||||
stage: deploy
|
||||
image: docker:18.09
|
||||
|
|
18
tox.ini
18
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = {py2,py3}-{flake8,isort,yapf,build},pytest,py2,py3
|
||||
envlist = {py2,py3}-flake8,isort,yapf,{py2,py3}-{build,pytest}
|
||||
|
||||
[testenv:flake8]
|
||||
deps =
|
||||
|
@ -7,25 +7,13 @@ deps =
|
|||
skip_install = True
|
||||
commands = flake8
|
||||
|
||||
[testenv:py2-isort]
|
||||
[testenv:isort]
|
||||
deps =
|
||||
isort==4.3.17
|
||||
skip_install = True
|
||||
commands = isort -rc -c -df
|
||||
|
||||
[testenv:py3-isort]
|
||||
deps =
|
||||
isort==4.3.17
|
||||
skip_install = True
|
||||
commands = isort -rc -c -df
|
||||
|
||||
[testenv:py2-yapf]
|
||||
deps =
|
||||
yapf==0.27.0
|
||||
skip_install = True
|
||||
commands = yapf -d -r .
|
||||
|
||||
[testenv:py3-yapf]
|
||||
[testenv:yapf]
|
||||
deps =
|
||||
yapf==0.27.0
|
||||
skip_install = True
|
||||
|
|
Loading…
Reference in New Issue