diff --git a/.circleci/config.yml b/.circleci/config.yml index 01242a41d15b8..86f8552b477cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,6 +55,12 @@ jobs: if [[ -n $(grep datastore ~/target_packages) ]]; then nox -f datastore/nox.py fi + - run: + name: Run tests - google.cloud.dlp + command: | + if [[ -n $(grep dlp ~/target_packages) ]]; then + nox -f dlp/nox.py + fi - run: name: Run tests - google.cloud.dns command: | diff --git a/dlp/nox.py b/dlp/nox.py index 0f6bd713afbe2..25e7fc7ee5048 100644 --- a/dlp/nox.py +++ b/dlp/nox.py @@ -15,6 +15,7 @@ from __future__ import absolute_import import nox +import os @nox.session @@ -25,12 +26,16 @@ def unit_tests(session, python_version): # Run unit tests against all supported versions of Python. session.interpreter = 'python{}'.format(python_version) + # Set the virtualenv dirname. + session.virtualenv_dirname = 'unit-' + python_version + # Install all test dependencies, then install this package in-place. session.install('mock', 'pytest', 'pytest-cov') session.install('-e', '.') # Run py.test against the unit tests. - session.run('py.test', '--quiet', 'tests/') + session.run('py.test', '--quiet', 'tests/unit/') + @nox.session def lint_setup_py(session):