diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 433912f..5b9a4c3 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -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%. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..55e54d8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +services: + postgres: + image: postgres:13 + environment: + POSTGRES_HOST_AUTH_METHOD: trust + POSTGRES_DB: modelutils + POSTGRES_USER: postgres + ports: + - 5432:5432