guardian / typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Apache License 2.0
276 stars 12 forks source link

Add a postgres database to the rule management service #114

Closed jonathonherbert closed 3 years ago

jonathonherbert commented 3 years ago

What does this change?

Adds a DB integration using scalikejdbc. Uses the db ops trait pattern found in facia-tool.

In light of the issues we've had testing in different CI environments in the Grid (e.g. GHA), we've opted for a docker-compose call within a script for local and CI in place of a Dockerkit based solution. This also means that both local and test rely on the same set of definitions for their environment, but v. happy to consider other solutions if anyone has other suggestions/opinions.

How to test

The healthcheck should pass, and the tests should pass locally and in CI – they're all now dependent on an active database connection.

How can we measure success?

We have a database implementation that works in our local and CI environments, and it's easy to test against.

Infra work to follow in a separate PR.