Add the components to test the postgres database on github actions#465
Merged
stephen-riggs merged 20 commits intomainfrom Jan 28, 2025
Merged
Add the components to test the postgres database on github actions#465stephen-riggs merged 20 commits intomainfrom
stephen-riggs merged 20 commits intomainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #465 +/- ##
==========================================
+ Coverage 27.03% 27.28% +0.24%
==========================================
Files 78 78
Lines 10304 10304
Branches 1364 1364
==========================================
+ Hits 2786 2811 +25
+ Misses 7435 7401 -34
- Partials 83 92 +9 |
tieneupin
approved these changes
Jan 24, 2025
Contributor
tieneupin
left a comment
There was a problem hiding this comment.
Looks good. Thanks so much for figuring out how to implement database testing!
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.
This adds a postgres database to the github workflows, with an exposed port. The connection environment variable are then passed onto all tests.
The url and engine for the postgres database are in a new
tests/__init__.pyfile for importing into test files. Intests/conftest.pyis a common fixture that can be used to setup the database for all tests, and adds a sample murfey session to it.As an example of this test setup, I have written tests for the
register_grid_squarefunction in the position analysis.Also fixes a bug in the position analysis where file paths are secured into strings.