-
Notifications
You must be signed in to change notification settings - Fork 1
Add the components to test the postgres database on github actions #465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks so much for figuring out how to implement database testing!
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.