diff --git a/.kokoro/presubmit/presubmit.cfg b/.kokoro/presubmit/presubmit.cfg index fa39b1118..ce3953120 100644 --- a/.kokoro/presubmit/presubmit.cfg +++ b/.kokoro/presubmit/presubmit.cfg @@ -2,14 +2,6 @@ # Disable system tests. env_vars: { - key: "RUN_SYSTEM_TESTS" - value: "false" -} -env_vars: { - key: "RUN_SNIPPETS_TESTS" - value: "false" -} -env_vars: { - key: "RUN_LINTING_TYPING_TESTS" - value: "false" + key: "NOX_SESSION" + value: "unit_noextras unit cover docs" } diff --git a/noxfile.py b/noxfile.py index 78a9ab5b6..02655a7b7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -132,10 +132,6 @@ def unit_noextras(session): def mypy(session): """Run type checks with mypy.""" - # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true. - if os.environ.get("RUN_LINTING_TYPING_TESTS", "true") == "false": - session.skip("RUN_LINTING_TYPING_TESTS is set to false, skipping") - session.install("-e", ".[all]") session.install(MYPY_VERSION) @@ -157,10 +153,6 @@ def pytype(session): # recent version avoids the error until a possibly better fix is found. # https://github.com/googleapis/python-bigquery/issues/655 - # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true. - if os.environ.get("RUN_LINTING_TYPING_TESTS", "true") == "false": - session.skip("RUN_LINTING_TYPING_TESTS is set to false, skipping") - session.install("attrs==20.3.0") session.install("-e", ".[all]") session.install(PYTYPE_VERSION) @@ -176,10 +168,6 @@ def system(session): CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - # Check the value of `RUN_SYSTEM_TESTS` env var. It defaults to true. - if os.environ.get("RUN_SYSTEM_TESTS", "true") == "false": - session.skip("RUN_SYSTEM_TESTS is set to false, skipping") - # Sanity check: Only run system tests if the environment variable is set. if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""): session.skip("Credentials must be set via environment variable.") @@ -224,10 +212,6 @@ def system(session): def mypy_samples(session): """Run type checks with mypy.""" - # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true. - if os.environ.get("RUN_LINTING_TYPING_TESTS", "true") == "false": - session.skip("RUN_LINTING_TYPING_TESTS is set to false, skipping") - session.install("pytest") for requirements_path in CURRENT_DIRECTORY.glob("samples/*/requirements.txt"): session.install("-r", str(requirements_path)) @@ -263,10 +247,6 @@ def mypy_samples(session): def snippets(session): """Run the snippets test suite.""" - # Check the value of `RUN_SNIPPETS_TESTS` env var. It defaults to true. - if os.environ.get("RUN_SNIPPETS_TESTS", "true") == "false": - session.skip("RUN_SNIPPETS_TESTS is set to false, skipping") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) @@ -409,10 +389,6 @@ def lint(session): serious code quality issues. """ - # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true. - if os.environ.get("RUN_LINTING_TYPING_TESTS", "true") == "false": - session.skip("RUN_LINTING_TYPING_TESTS is set to false, skipping") - session.install("flake8", BLACK_VERSION) session.install("-e", ".") session.run("flake8", os.path.join("google", "cloud", "bigquery")) @@ -427,10 +403,6 @@ def lint(session): def lint_setup_py(session): """Verify that setup.py is valid (including RST check).""" - # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true. - if os.environ.get("RUN_LINTING_TYPING_TESTS", "true") == "false": - session.skip("RUN_LINTING_TYPING_TESTS is set to false, skipping") - session.install("docutils", "Pygments") session.run("python", "setup.py", "check", "--restructuredtext", "--strict") @@ -441,10 +413,6 @@ def blacken(session): Format code to uniform standard. """ - # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true. - if os.environ.get("RUN_LINTING_TYPING_TESTS", "true") == "false": - session.skip("RUN_LINTING_TYPING_TESTS is set to false, skipping") - session.install(BLACK_VERSION) session.run("black", *BLACK_PATHS)