diff --git a/.travis.yml b/.travis.yml index f35547aa9..825d9c53e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,11 @@ matrix: - DOCKER_IMAGE=mcode + - env: BUILD_NAME=py37-fmt + python: '3.7' + script: tox -e $BUILD_NAME -- --check + + - env: BUILD_NAME=py27-lint python: '2.7' - env: BUILD_NAME=py37-lint diff --git a/tox.ini b/tox.ini index 2733d1a5a..b139491a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{27,34,35,36,37}-unit, py{27,34,35,36,37}-acceptance-{activehdl,ghdl,modelsim,rivierapro}, py{27,34,35,36,37}-vcomponents-{activehdl,ghdl,modelsim,rivierapro}, py{27,35,36,37}-lint, py{27,35,36,37}-docs +envlist = py{36,37}-fmt, py{27,34,35,36,37}-{unit}, py{27,35,36,37}-{lint,docs}, py{27,34,35,36,37}-{acceptance,vcomponents}-{activehdl,ghdl,modelsim,rivierapro} skip_missing_interpreters = True [testenv] @@ -7,6 +7,7 @@ recreate=True passenv=ALDEC_LICENSE_FILE deps= + fmt: black pytest py27-unit: mock lint: pycodestyle @@ -23,6 +24,7 @@ setenv= acceptance-rivierapro: VUNIT_SIMULATOR=rivierapro commands= + fmt: {envpython} -m black ./ --exclude 'vunit\/vhdl\/JSON-for-VHDL|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist' {posargs} unit: {envpython} -m pytest -v vunit/test/unit lint: {envpython} -m pytest -v vunit/test/lint docs: {envpython} tools/build_docs.py {envtmpdir}/docsbuild