diff --git a/.travis.yml b/.travis.yml index eaee44d..2831f3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ before_install: - sudo apt-get -qq update - sudo apt-get install -y portaudio19-dev libffi-dev libssl-dev install: - - pip install nox-automation + - pip install nox script: - - nox -f google-assistant-grpc/nox.py -s lint - - nox -f google-assistant-sdk/nox.py -s lint unittest + - nox -f google-assistant-grpc/noxfile.py -s lint + - nox -f google-assistant-sdk/noxfile.py -s lint unittest diff --git a/google-assistant-grpc/MAINTAINER.md b/google-assistant-grpc/MAINTAINER.md index 2e6aa0e..13ecbba 100644 --- a/google-assistant-grpc/MAINTAINER.md +++ b/google-assistant-grpc/MAINTAINER.md @@ -5,7 +5,7 @@ Maintainer guide - Install automation tools - pip install --upgrade nox-automation + pip install --upgrade nox ## Tasks diff --git a/google-assistant-grpc/nox.py b/google-assistant-grpc/noxfile.py similarity index 97% rename from google-assistant-grpc/nox.py rename to google-assistant-grpc/noxfile.py index fb7bf5f..bcb8def 100644 --- a/google-assistant-grpc/nox.py +++ b/google-assistant-grpc/noxfile.py @@ -17,9 +17,8 @@ import nox -@nox.session +@nox.session(python=["3"]) def lint(session): - session.interpreter = 'python3' session.install('pip', 'setuptools') session.install('docutils', 'flake8', 'readme_renderer') session.run('flake8', 'nox.py', 'setup.py') diff --git a/google-assistant-sdk/MAINTAINER.md b/google-assistant-sdk/MAINTAINER.md index 17b682d..c03cc0a 100644 --- a/google-assistant-sdk/MAINTAINER.md +++ b/google-assistant-sdk/MAINTAINER.md @@ -5,7 +5,7 @@ Maintainer guide - Install automation tools - pip install --upgrade nox-automation + pip install --upgrade nox ## Tasks diff --git a/google-assistant-sdk/nox.py b/google-assistant-sdk/noxfile.py similarity index 81% rename from google-assistant-sdk/nox.py rename to google-assistant-sdk/noxfile.py index 7ad8908..abf3149 100644 --- a/google-assistant-sdk/nox.py +++ b/google-assistant-sdk/noxfile.py @@ -16,9 +16,8 @@ import nox -@nox.session +@nox.session(python=["3"]) def lint(session): - session.interpreter = 'python3' session.install('pip', 'setuptools') session.install('docutils', 'flake8', 'readme_renderer') session.run('flake8', @@ -29,10 +28,8 @@ def lint(session): session.run('python', '-m', 'json.tool', 'actions.json') -@nox.session -@nox.parametrize('python_version', ['2.7', '3']) -def unittest(session, python_version): - session.interpreter = 'python' + python_version +@nox.session(python=['2.7', '3']) +def unittest(session): session.install('pip', 'setuptools') session.install('pytest', 'future') session.install('../google-assistant-grpc/') @@ -40,10 +37,8 @@ def unittest(session, python_version): session.run('py.test', '-k', 'not test_endtoend', 'tests') -@nox.session -@nox.parametrize('python_version', ['2.7', '3']) -def endtoend_test(session, python_version): - session.interpreter = 'python' + python_version +@nox.session(python=['2.7', '3']) +def endtoend_test(session): session.install('pip', 'setuptools') session.install('pytest', 'future') session.install('../google-assistant-grpc/')