pepkit / pepdbagent

Database for storing sample metadata
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

A Database is required to run tests in GitHub actions #21

Closed nleroy917 closed 1 year ago

nleroy917 commented 1 year ago

In order to run our unit tests in GitHub action workflows, we need a database to connect to. I have read a bit into GitHub action services, and I tried to set something up, so that we can spin up a postgres instance while testing. I don't think it necessarily works, however. Im using act to test locally.

I see us having two options:

  1. Host database somewhere else to test against. Maybe we can point at the eventual pephub database
  2. Spin up database inside the github action containers.

I'm more partial to option 2 (or other options if there are other options!) Help is very much appreciated here. You can see the action I've got setup so far, here: https://github.com/pepkit/pephub_db/blob/dev_nathan/.github/workflows/pytest.yml

khoroshevskyi commented 1 year ago

solved with mock tests