Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 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
41 changes: 41 additions & 0 deletions .github/workflows/presubmit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push:
branches:
- main
pull_request:
name: Presubmit checks
jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install nox
run: python -m pip install nox
- name: Check formatting
run: nox -s lint
- name: Check lint setup
run: nox -s lint_setup_py
units:

Check warning on line 24 in .github/workflows/presubmit.yaml

View check run for this annotation

GitHub Advanced Security / CodeQL

Workflow does not contain permissions

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}
Comment thread Fixed
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: [3.8, 3.9, 3.10, 3.11, 3.12, 3.13]

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python}}
- name: Install nox
run: python -m pip install nox
- name: Run unit tests
run: nox -s unit-${{matrix.python}}

Check warning on line 41 in .github/workflows/presubmit.yaml

View check run for this annotation

GitHub Advanced Security / CodeQL

Workflow does not contain permissions

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}
Comment thread Fixed
5 changes: 5 additions & 0 deletions .kokoro/presubmit/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ env_vars: {
key: "RUN_SYSTEM_TESTS"
value: "false"
}
# Only run a subset of all nox sessions
env_vars: {
key: "NOX_SESSION"
value: "unit-3.8 unit-3.12 cover docs docfx"
}
9 changes: 6 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,12 @@ def system(session, protobuf_implementation, database_dialect):
session.skip(
"Credentials or emulator host must be set via environment variable"
)
# If POSTGRESQL tests and Emulator, skip the tests
if os.environ.get("SPANNER_EMULATOR_HOST") and database_dialect == "POSTGRESQL":
session.skip("Postgresql is not supported by Emulator yet.")
if not (
os.environ.get("SPANNER_EMULATOR_HOST") or protobuf_implementation == "python"
):
session.skip(
"Only run system tests on real Spanner with one protobuf implementation to speed up the build"
)

# Install pyopenssl for mTLS testing.
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true":
Expand Down
Loading