Skip to content

Commit 1adcb4a

Browse files
1 parent 6c725f4 commit 1adcb4a

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

‎.github/workflows/docs.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.13"
15+
python-version: "3.10"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup Python
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: "3.13"
31+
python-version: "3.10"
3232
- name: Install nox
3333
run: |
3434
python -m pip install --upgrade setuptools pip wheel
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "system-3.13"
7+
}

‎noxfile.py‎

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@
7878
"unit",
7979
"system",
8080
"mypy",
81+
"mypy",
8182
"cover",
8283
"lint",
8384
"lint_setup_py",
8485
"blacken",
8586
"docs",
8687
"doctests",
88+
"doctests",
8789
"docfx",
8890
"format",
8991
]
@@ -154,6 +156,22 @@ def mypy(session):
154156
session.run("mypy", "-p", "google.cloud.datastore")
155157

156158

159+
@nox.session(python=DEFAULT_PYTHON_VERSION)
160+
def mypy(session):
161+
"""Verify type hints are mypy compatible."""
162+
session.install("-e", ".")
163+
# Exclude types-protobuf==4.24.0.20240106
164+
# See https://github.com/python/typeshed/issues/11254
165+
session.install(
166+
"mypy",
167+
"types-setuptools",
168+
"types-mock",
169+
"types-protobuf!=4.24.0.20240106",
170+
"types-requests",
171+
)
172+
session.run("mypy", "-p", "google.cloud.datastore")
173+
174+
157175
@nox.session(python=DEFAULT_PYTHON_VERSION)
158176
def lint_setup_py(session):
159177
"""Verify that setup.py is valid (including RST check)."""
@@ -285,6 +303,10 @@ def system(session, disable_grpc):
285303

286304
install_systemtest_dependencies(session, "-c", constraints_path)
287305

306+
env = {}
307+
if disable_grpc:
308+
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
309+
288310
env = {}
289311
if disable_grpc:
290312
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
@@ -365,11 +387,26 @@ def doctests(session):
365387
session.install("mock", "pytest", "sphinx", "google-cloud-testutils")
366388
session.install("-e", ".")
367389

390+
env = {}
391+
if disable_grpc:
392+
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
393+
368394
# Run py.test against the system tests.
369395
session.run("py.test", "tests/doctests.py")
370396

371397

372-
@nox.session(python="3.10")
398+
@nox.session(python="3.13")
399+
def doctests(session):
400+
# Install all test dependencies, then install this package into the
401+
# virtualenv's dist-packages.
402+
session.install("mock", "pytest", "sphinx", "google-cloud-testutils")
403+
session.install("-e", ".")
404+
405+
# Run py.test against the system tests.
406+
session.run("py.test", "tests/doctests.py")
407+
408+
409+
@nox.session(python="3.13")
373410
def docfx(session):
374411
"""Build the docfx yaml files for this library."""
375412

0 commit comments

Comments
 (0)