Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 31 additions & 9 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
uv pip install --system "nox[uv]"
- name: Run unit tests
env:
NOX_DEFAULT_VENV_BACKEND: uv
UV_VENV_SEED: 1
UV_COMPILE_BYTECODE: 1
COVERAGE_FILE: .coverage-${{ matrix.python }}
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
Expand Down Expand Up @@ -68,12 +74,18 @@ jobs:
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
uv pip install --system "nox[uv]"
- name: Run ${{ matrix.option }} tests
env:
NOX_DEFAULT_VENV_BACKEND: uv
UV_VENV_SEED: 1
UV_COMPILE_BYTECODE: 1
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_TYPE: ${{ matrix.option }}
Expand All @@ -100,12 +112,18 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
uv pip install --system "nox[uv]"
- name: Run ${{ matrix.option }} tests
env:
NOX_DEFAULT_VENV_BACKEND: uv
UV_VENV_SEED: 1
UV_COMPILE_BYTECODE: 1
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_TYPE: ${{ matrix.option }}
Expand Down Expand Up @@ -133,11 +151,15 @@ jobs:
- name: Set number of files changes in packages directory
id: packages
run: echo "::set-output name=num_files_changed::$(git diff HEAD~1 -- packages | wc -l)"
- name: Setup uv
if: steps.packages.outputs.num_files_changed > 0 || steps.packages.num_files_changed > 0
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install coverage
if: steps.packages.num_files_changed > 0
if: steps.packages.outputs.num_files_changed > 0 || steps.packages.num_files_changed > 0
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install coverage
uv pip install --system coverage
- name: Download coverage results
if: ${{ steps.date.packages.num_files_changed > 0 }}
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion packages/bigframes/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ def core_deps_from_source(session, protobuf_implementation):
]

for dep in core_dependencies_from_source:
session.install(dep, "--no-deps", "--ignore-installed")
session.install(dep, "--no-deps", "--upgrade")
print(f"Installed {dep}")

session.run(
Expand Down
2 changes: 1 addition & 1 deletion packages/bigquery-magics/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def prerelease_deps(session):
# from main to detect any potential breaking changes. For context, see:
# https://github.com/googleapis/python-bigquery-pandas/issues/854
session.install(
"--ignore-installed",
"--upgrade",
# TODO(https://github.com/googleapis/google-cloud-python/pull/126): Install this again when we relax the pin.
# "https://github.com/cloudspannerecosystem/spanner-graph-notebook/archive/refs/heads/main.zip",
f"{CURRENT_DIRECTORY}/../google-cloud-bigquery",
Expand Down
2 changes: 1 addition & 1 deletion packages/db-dtypes/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def core_deps_from_source(session, protobuf_implementation):
]

for dep in core_dependencies_from_source:
session.install(dep, "--no-deps", "--ignore-installed")
session.install(dep, "--no-deps", "--upgrade")
print(f"Installed {dep}")

tests_path = os.path.join("tests", "unit")
Expand Down
6 changes: 3 additions & 3 deletions packages/google-ads-admanager/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-ads-datamanager/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-ads-marketingplatform-admin/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-ai-generativelanguage/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-analytics-admin/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-analytics-data/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
2 changes: 1 addition & 1 deletion packages/google-api-core/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def install_core_deps_dependencies(session, constraints_path):
]

for dep in core_dependencies_from_source:
session.install(dep, "--no-deps", "--ignore-installed")
session.install(dep, "--no-deps", "--upgrade")
print(f"Installed {dep}")

# Remaining dependencies
Expand Down
6 changes: 3 additions & 3 deletions packages/google-apps-card/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-apps-chat/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-apps-events-subscriptions/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-apps-meet/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-apps-script-type/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
6 changes: 3 additions & 3 deletions packages/google-area120-tables/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
2 changes: 1 addition & 1 deletion packages/google-auth-oauthlib/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def core_deps_from_source(session):
]

for dep in core_dependencies_from_source:
session.install(dep, "--no-deps", "--ignore-installed")
session.install(dep, "--no-deps", "--upgrade")
print(f"Installed {dep}")

session.run(
Expand Down
6 changes: 3 additions & 3 deletions packages/google-cloud-access-approval/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def prerelease_deps(session, protobuf_implementation):

# Batch pip installations to avoid sequential overhead
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
if pypi_deps:
session.install(*pypi_deps, "--pre", "--no-deps", "--ignore-installed")
session.install(*pypi_deps, "--pre", "--no-deps", "--upgrade")

# TODO(https://github.com/grpc/grpc/issues/38965): Add `grpcio-status``
# to the dictionary below once this bug is fixed.
Expand Down Expand Up @@ -636,7 +636,7 @@ def core_deps_from_source(session, protobuf_implementation):
# Batch the pip installation to avoid sequential overhead
dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
print(
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
)
Expand Down
Loading
Loading