Skip to content

Commit 4be0adf

Browse files
authored
tests: consolidate docs presubmits (#16628)
Fixes #16625
1 parent 0b947fc commit 4be0adf

File tree

1 file changed

+0
-90
lines changed

1 file changed

+0
-90
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -13,66 +13,7 @@ permissions:
1313
contents: read
1414

1515
jobs:
16-
# The two jobs "docs" and "docsfx" are marked as required checks
17-
# (and reset as such periodically) elsewhere in our
18-
# automation. Since we don't want to block non-release PRs on docs
19-
# failures, we want these checks to always show up as succeeded for
20-
# those PRs. For release PRs, we do want the checks to run and block
21-
# merge on failure.
22-
#
23-
# We accomplish this by using an "if:" conditional. Jobs
24-
# thus skipped via a conditional (i.e. a false condition) show as
25-
# having succeeded. See:
26-
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
27-
#
28-
# Since we want advance notice of docs errors, we also have two
29-
# corresponding non-required checks, the jobs "docs-warnings" and
30-
# "docfx-warnings", that run for all non-release PRs (i.e., when the
31-
# "docs" and "docfx" jobs don't run).
32-
#
33-
#
34-
# PLEASE ENSURE THE FOLLOWING AT ALL TIMES:
35-
#
36-
# - the "*-warnings" checks remain NON-REQUIRED in the repo
37-
# settings.
38-
#
39-
# - the steps for the jobs "docs" and "docfx" are identical to the
40-
# ones in "docs-warnings" and "docfx-warnings", respectively. We
41-
# will be able to avoid config duplication once GitHub actions
42-
# support YAML anchors (see
43-
# https://github.com/actions/runner/issues/1182)
4416
docs:
45-
if: github.actor == 'release-please[bot]'
46-
runs-on: ubuntu-latest
47-
steps:
48-
- name: Checkout
49-
uses: actions/checkout@v6
50-
# Use a fetch-depth of 2 to avoid error `fatal: origin/main...HEAD: no merge base`
51-
# See https://github.com/googleapis/google-cloud-python/issues/12013
52-
# and https://github.com/actions/checkout#checkout-head.
53-
with:
54-
fetch-depth: 2
55-
- name: Setup Python
56-
uses: actions/setup-python@v6
57-
with:
58-
python-version: "3.10"
59-
- name: Install nox
60-
run: |
61-
python -m pip install --upgrade setuptools pip wheel
62-
python -m pip install nox
63-
- name: Run docs
64-
env:
65-
BUILD_TYPE: presubmit
66-
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
67-
TEST_TYPE: docs
68-
# TODO(https://github.com/googleapis/google-cloud-python/issues/13775): Specify `PY_VERSION` rather than relying on the default python version of the nox session.
69-
PY_VERSION: "unused"
70-
run: |
71-
ci/run_conditional_tests.sh
72-
docs-warnings:
73-
if: github.actor != 'release-please[bot]'
74-
name: "Docs warnings: will block release"
75-
continue-on-error: true
7617
runs-on: ubuntu-latest
7718
steps:
7819
- name: Checkout
@@ -100,37 +41,6 @@ jobs:
10041
run: |
10142
ci/run_conditional_tests.sh
10243
docfx:
103-
if: github.actor == 'release-please[bot]'
104-
runs-on: ubuntu-latest
105-
steps:
106-
- name: Checkout
107-
uses: actions/checkout@v6
108-
# Use a fetch-depth of 2 to avoid error `fatal: origin/main...HEAD: no merge base`
109-
# See https://github.com/googleapis/google-cloud-python/issues/12013
110-
# and https://github.com/actions/checkout#checkout-head.
111-
with:
112-
fetch-depth: 2
113-
- name: Setup Python
114-
uses: actions/setup-python@v6
115-
with:
116-
python-version: "3.10"
117-
- name: Install nox
118-
run: |
119-
python -m pip install --upgrade setuptools pip wheel
120-
python -m pip install nox
121-
- name: Run docfx
122-
env:
123-
BUILD_TYPE: presubmit
124-
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
125-
TEST_TYPE: docfx
126-
# TODO(https://github.com/googleapis/google-cloud-python/issues/13775): Specify `PY_VERSION` rather than relying on the default python version of the nox session.
127-
PY_VERSION: "unused"
128-
run: |
129-
ci/run_conditional_tests.sh
130-
docfx-warnings:
131-
if: github.actor != 'release-please[bot]'
132-
name: "Docfx warnings: will block release"
133-
continue-on-error: true
13444
runs-on: ubuntu-latest
13545
steps:
13646
- name: Checkout

0 commit comments

Comments
 (0)