diff --git a/buildspec-unittests.yml b/buildspec-unittests.yml index 3e7861cbca..8732090421 100644 --- a/buildspec-unittests.yml +++ b/buildspec-unittests.yml @@ -7,11 +7,11 @@ phases: - TOX_PARALLEL_NO_SPINNER=1 - PY_COLORS=0 - start_time=`date +%s` - - tox -e flake8,pylint,twine,black-check + - tox -e flake8,pylint,twine,black-check --parallel all - ./ci-scripts/displaytime.sh 'flake8,pylint,twine,black-check' $start_time - start_time=`date +%s` - - tox -e sphinx,doc8 + - tox -e sphinx,doc8 --parallel all - ./ci-scripts/displaytime.sh 'sphinx,doc8' $start_time # run unit tests diff --git a/tox.ini b/tox.ini index 71762c210b..b26e390822 100644 --- a/tox.ini +++ b/tox.ini @@ -67,9 +67,11 @@ passenv = # {posargs} can be passed in by additional arguments specified when invoking tox. # Can be used to specify which tests to run, e.g.: tox -- -s commands = - coverage run --source sagemaker -m pytest {posargs} + pytest --cov=sagemaker --cov-append {posargs} {env:IGNORE_COVERAGE:} coverage report --fail-under=86 --omit */tensorflow/tensorflow_serving/* deps = .[test] +depends = + {py27,py36,py37,py38}: clean [testenv:flake8] basepython = python3 @@ -130,3 +132,8 @@ basepython = python3 deps = black==19.10b0 commands = black -l 100 --check ./ + +[testenv:clean] +deps = coverage +skip_install = true +commands = coverage erase