Skip to content

Commit

Permalink
chore(python): exclude templated GH action workflows (#140)
Browse files Browse the repository at this point in the history
* ci(python): run lint / unit tests / docs as GH actions

Source-Link: googleapis/synthtool@57be0cd
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 <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people committed Jan 20, 2022
1 parent 792340d commit e5d5938
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
16 changes: 15 additions & 1 deletion packages/grafeas/.github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -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

19 changes: 9 additions & 10 deletions packages/grafeas/owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"''')
Expand All @@ -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)

0 comments on commit e5d5938

Please sign in to comment.