From e5d5938334cfd69f0dae025ceee261d00dff1adc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 13:11:11 -0500 Subject: [PATCH] chore(python): exclude templated GH action workflows (#140) * ci(python): run lint / unit tests / docs as GH actions Source-Link: https://github.com/googleapis/synthtool/commit/57be0cdb0b94e1669cee0ca38d790de1dfdbcd44 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ed1f9983d5a935a89fe8085e8bb97d94e41015252c5b6c9771257cf8624367e6 * add commit to trigger gh actions * exclude templated github actions Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- packages/grafeas/.github/.OwlBot.lock.yaml | 16 +++++++++++++++- packages/grafeas/owlbot.py | 19 +++++++++---------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/packages/grafeas/.github/.OwlBot.lock.yaml b/packages/grafeas/.github/.OwlBot.lock.yaml index eecb84c21b27..b668c04d5d65 100644 --- a/packages/grafeas/.github/.OwlBot.lock.yaml +++ b/packages/grafeas/.github/.OwlBot.lock.yaml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:ae600f36b6bc972b368367b6f83a1d91ec2c82a4a116b383d67d547c56fe6de3 + digest: sha256:ed1f9983d5a935a89fe8085e8bb97d94e41015252c5b6c9771257cf8624367e6 + diff --git a/packages/grafeas/owlbot.py b/packages/grafeas/owlbot.py index 50ef51d01d7a..a180c9c15926 100644 --- a/packages/grafeas/owlbot.py +++ b/packages/grafeas/owlbot.py @@ -202,11 +202,17 @@ def test_get_occurrence""", samples=False, microgenerator=True, # set to True only if there are samples cov_level=90 # some coverage is missing due to manual alterations ) -python.py_samples(skip_readmes=True) + s.move( - templated_files, excludes=[".coveragerc", ".github/snippet-bot.yml"] -) # microgenerator has a good .coveragerc file + templated_files, + excludes=[ + ".coveragerc", # microgenerator has a good .coveragerc file + ".github/snippet-bot.yml", + ".github/workflows", # exclude templated gh actions as tests require credentials + ] +) +python.py_samples(skip_readmes=True) # Library code is in "grafeas" instead of "google" s.replace("noxfile.py", """['"]google['"]""", '''"grafeas"''') @@ -216,12 +222,5 @@ def test_get_occurrence""", "--cov=grafeas", ) -# Block pushing non-cloud libraries to Cloud RAD -s.replace( - ".kokoro/docs/common.cfg", - r'value: "docs-staging-v2"', - r'value: "docs-staging-v2-staging"' -) - s.shell.run(["nox", "-s", "blacken"], hide_output=False)