Add docker-compose for local development

This commit is contained in:
Jelmer Draaijer 2023-04-06 13:42:35 +02:00
parent 8677eef1ca
commit 1e62e848b6
2 changed files with 21 additions and 0 deletions

View file

@ -74,6 +74,18 @@ To run tox and generate a coverage report (in ``htmlcov`` directory)::
make test
A database is required to run the tests. For convince there is a ``docker-compose.yml`` file for spinning up a
database container. To start the database container run:
docker-compose up -d
Another way to run the tests with a sqlite database is to export the `SQLITE` variable::
export SQLITE=1
make test
# or
SQLITE=1 python setup.py test
**Please note**: Before a pull request can be merged, all tests must pass and
code/branch coverage in tests must be 100%.

9
docker-compose.yml Normal file
View file

@ -0,0 +1,9 @@
services:
postgres:
image: postgres:13
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: modelutils
POSTGRES_USER: postgres
ports:
- 5432:5432