Refactor pytest CI architecture with parallel testing and coverage aggregation#18
Merged
jason810496 merged 8 commits intomainfrom Dec 28, 2025
Merged
Conversation
Co-authored-by: jason810496 <[email protected]>
Co-authored-by: jason810496 <[email protected]>
Co-authored-by: jason810496 <[email protected]>
Co-authored-by: jason810496 <[email protected]>
Co-authored-by: jason810496 <[email protected]>
Copilot
AI
changed the title
[WIP] Refactor pytest CI architecture for multiple drivers
Refactor pytest CI architecture for per-driver sequential testing
Dec 28, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
jason810496
reviewed
Dec 28, 2025
Owner
jason810496
left a comment
There was a problem hiding this comment.
There are race condition when uploading coverage report that cause error.
I think we need to
- wait until all test matrix finish
- somehow aggregate the report ( maybe for each report should be named align with the python version and driver )
- then upload the final report / or batch upload the report
Co-authored-by: jason810496 <[email protected]>
Contributor
Author
Fixed in commit 2eaaf67. The workflow now:
This eliminates the race condition by ensuring only one job uploads to Codecov after all tests complete. |
Copilot
AI
changed the title
Refactor pytest CI architecture for per-driver sequential testing
Refactor pytest CI architecture with parallel testing and coverage aggregation
Dec 28, 2025
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.
Refactor pytest CI architecture with parallel testing and coverage aggregation
Description
Refactored CI to run tests in parallel for each Python version × driver combination with isolated databases and proper coverage report aggregation. Previously, tests ran in parallel with a single shared database, risking conflicts and coverage upload race conditions.
Changes
pytest CLI arguments:
--driver: Run tests for a single driver (psycopg2, asyncpg, pg8000, psycopg, psycopg2cffi)--db-name: Use a custom database nameGitHub Actions workflow:
pgmq_py312_psycopg2)Coverage report handling:
coverage-py{version}-{driver}.xml)upload-coveragejob waits for all tests to completeTest filtering:
--driverspecifiedExample usage:
Documentation:
Updated CONTRIBUTING.md with CLI usage examples.
Status
Checklist
pre-commitwithruff)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.