Repository navigation
Conversation
The existing build-and-test workflow only runs on pushes to main/testing and releases, and builds full wheels on four platforms, so PRs get no feedback. Add a fast CI workflow (lint + pytest on 3.12-3.14) that runs on pull requests and pushes to main. Server-dependent tests skip gracefully when the bundled PostgreSQL binaries have not been built (see tests/conftest.py); they still run in build-and-test.yml where the binaries exist. Also fix the 26 pre-existing ruff violations so the lint job is green, and cap test-only sqlalchemy to <2.1 since sqlalchemy-utils 0.42.1 (latest) is incompatible with sqlalchemy 2.1 and breaks test collection on fresh installs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
This repo has no CI on pull requests. The existing
build-and-test.ymlonly runs on pushes tomain/testing, releases, and manual dispatch — and it builds full wheels on four platforms, so it's too heavy to run per-PR anyway.What this adds
New
.github/workflows/ci.yml(runs onpull_request, pushes tomain, manual dispatch) with two fast jobs:ruff check .(pinned 0.9.5) +compileall.[test], smoke-importspgembed, runspytestSupporting changes
tests/conftest.py(new): most tests need a live server backed by binaries frommake, which a lightweight PR job doesn't build. Such tests now skip with a clear reason when binaries are absent unless marked@pytest.mark.no_server_required. No-op when binaries exist, sobuild-and-test.ymlbehavior is unchanged. Verified: 1 passed, 20 skipped on a fresh checkout.ruffviolations that would fail the lint job on day one. All trivial/behavior-preserving (unused imports, placeholder-less f-strings,__all__for re-exports,import pwdnext to its platform guard).pyproject.toml: cap test-onlysqlalchemy>=2,<2.1— fresh installs otherwise pull 2.1.x, which breakssqlalchemy-utils0.42.1 (latest) at import and errors the whole suite during collection. This also protects the heavy workflow's test step.Follow-up (needs repo settings, not code)
Mark the new CI workflow as a required status check in branch protection for
main.