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
7 changes: 7 additions & 0 deletions .kokoro/presubmit/sqlalchemy_compliance.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Only run compliance nox session.
env_vars: {
key: "NOX_SESSION"
value: "compliance"
}
Comment thread
daniel-sanche marked this conversation as resolved.
6 changes: 6 additions & 0 deletions .kokoro/presubmit/system.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ env_vars: {
key: "NOX_SESSION"
value: "system-3.12"
}

# Skip compliance tests in system job since they run in dedicated compliance job
env_vars: {
key: "RUN_COMPLIANCE_TESTS"
value: "false"
}
6 changes: 6 additions & 0 deletions .kokoro/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ for path in `find 'packages' \
files_to_check=("${package_path}")
fi

# When running compliance tests, only test packages that have compliance suites
if [[ "${NOX_SESSION:-}" == "compliance"* && "${package_name:-}" != "sqlalchemy-"* ]]; then
printf "SKIP %-20s %-40s %s\n" "[not_applicable]" "${package_name}" "${commit_hash:-HEAD}"
continue
fi

set +e
# Passing the array expanded as arguments to git diff.
package_modified=$(git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- "${files_to_check[@]}" | wc -l)
Expand Down
2 changes: 1 addition & 1 deletion packages/sqlalchemy-bigquery/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SQLAlchemy Dialect for BigQuery

|GA| |pypi| |versions|

`SQLALchemy Dialects`_
`SQLAlchemy Dialects`_

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked Gemini to find typos to fix to trigger the tests, instead of adding a temporary change. It found a couple!


- `Dialect Documentation`_
- `Product Documentation`_
Expand Down
2 changes: 1 addition & 1 deletion packages/sqlalchemy-spanner/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Spanner dialect for SQLAlchemy
Spanner dialect for SQLAlchemy represents an interface API designed to
make it possible to control Cloud Spanner databases with SQLAlchemy API.
The dialect is built on top of `the Spanner DB
API <https://github.com/googleapis/python-spanner/tree/master/google/cloud/spanner_dbapi>`__,
API <https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-spanner/google/cloud/spanner_dbapi>`__,
which is designed in accordance with
`PEP-249 <https://www.python.org/dev/peps/pep-0249/>`__.

Expand Down
16 changes: 13 additions & 3 deletions packages/sqlalchemy-spanner/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def lint_setup_py(session):
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")


@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[0])
@nox.session(python=SYSTEM_COMPLIANCE_MIGRATION_TEST_PYTHON_VERSIONS[0])
def compliance_test_14(session):
"""Run SQLAlchemy dialect compliance test suite."""
config_file = f"test_compliance_14_{session.python}_{uuid.uuid4().hex[:6]}.cfg"
Expand Down Expand Up @@ -484,10 +484,10 @@ def system(session, test_type):
"Credentials or emulator host must be set via environment variable"
)

if os.environ.get("RUN_COMPLIANCE_TESTS", "true") == "false" and not os.environ.get(
if os.environ.get("RUN_SYSTEM_TESTS", "true") == "false" and not os.environ.get(
"SPANNER_EMULATOR_HOST", ""
):
session.skip("RUN_COMPLIANCE_TESTS is set to false, skipping")
session.skip("RUN_SYSTEM_TESTS is set to false, skipping")

if test_type == "system" and session.python not in SYSTEM_TEST_PYTHON_VERSIONS:
session.skip("Standard system tests configured to run exclusively on 3.12")
Expand Down Expand Up @@ -524,6 +524,16 @@ def system(session, test_type):
)


@nox.session(python=SYSTEM_COMPLIANCE_MIGRATION_TEST_PYTHON_VERSIONS)
@nox.parametrize(
"test_type",
["compliance_14", "compliance_20"],
)
def compliance(session, test_type):
"""Run SQLAlchemy dialect compliance test suite."""
system(session, test_type=test_type)


@nox.session(python=DEFAULT_PYTHON_VERSION)
def mypy(session):
"""Run the type checker."""
Expand Down
Loading