From f2bd5914fc87240046f7a4ed53505390834bd3a3 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 20 Jul 2021 16:44:34 -0400 Subject: [PATCH] tests: split systests out into separate Kokoro jobs (#516) Closes #515 --- .github/sync-repo-settings.yaml | 11 +++++++++++ .kokoro/presubmit/presubmit.cfg | 8 +++++++- .kokoro/presubmit/system-2.7.cfg | 7 +++++++ .kokoro/presubmit/system-3.8.cfg | 7 +++++++ owlbot.py | 7 ++++++- 5 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/sync-repo-settings.yaml create mode 100644 .kokoro/presubmit/system-2.7.cfg create mode 100644 .kokoro/presubmit/system-3.8.cfg diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 000000000..d4756ac8f --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,11 @@ +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/sync-repo-settings +# Rules for master branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `master` +- pattern: master + requiredStatusCheckContexts: + - 'Kokoro' + - 'cla/google' + - 'Kokoro system-2.7' + - 'Kokoro system-3.8' diff --git a/.kokoro/presubmit/presubmit.cfg b/.kokoro/presubmit/presubmit.cfg index 8f43917d9..b158096f0 100644 --- a/.kokoro/presubmit/presubmit.cfg +++ b/.kokoro/presubmit/presubmit.cfg @@ -1 +1,7 @@ -# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file +# Format: //devtools/kokoro/config/proto/build.proto + +# Disable system tests. +env_vars: { + key: "RUN_SYSTEM_TESTS" + value: "false" +} diff --git a/.kokoro/presubmit/system-2.7.cfg b/.kokoro/presubmit/system-2.7.cfg new file mode 100644 index 000000000..3b6523a19 --- /dev/null +++ b/.kokoro/presubmit/system-2.7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "system-2.7" +} \ No newline at end of file diff --git a/.kokoro/presubmit/system-3.8.cfg b/.kokoro/presubmit/system-3.8.cfg new file mode 100644 index 000000000..f4bcee3db --- /dev/null +++ b/.kokoro/presubmit/system-3.8.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "system-3.8" +} \ No newline at end of file diff --git a/owlbot.py b/owlbot.py index 0e23239ec..be172d47a 100644 --- a/owlbot.py +++ b/owlbot.py @@ -26,6 +26,7 @@ # ---------------------------------------------------------------------------- templated_files = common.py_library( cov_level=100, + split_system_tests=True, system_test_external_dependencies=[ "google-cloud-iam", "google-cloud-pubsub < 2.0.0", @@ -38,7 +39,11 @@ ) s.move( - templated_files, excludes=["docs/multiprocessing.rst", "noxfile.py", "CONTRIBUTING.rst"], + templated_files, excludes=[ + "docs/multiprocessing.rst", + "noxfile.py", + "CONTRIBUTING.rst", + ], ) s.shell.run(["nox", "-s", "blacken"], hide_output=False)