Skip to content
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

Add the components to test the postgres database on github actions #465

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

stephen-riggs
Copy link
Contributor

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__.py file for importing into test files. In tests/conftest.py is 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_square function in the position analysis.

Also fixes a bug in the position analysis where file paths are secured into strings.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 27.30%. Comparing base (153719e) to head (1ca3091).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #465      +/-   ##
==========================================
+ Coverage   27.06%   27.30%   +0.24%     
==========================================
  Files          78       78              
  Lines       10293    10293              
  Branches     1361     1361              
==========================================
+ Hits         2786     2811      +25     
+ Misses       7419     7390      -29     
- Partials       88       92       +4     

Copy link
Contributor

@tieneupin tieneupin left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants