mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Add docker-compose for local development
This commit is contained in:
parent
8677eef1ca
commit
1e62e848b6
2 changed files with 21 additions and 0 deletions
|
|
@ -74,6 +74,18 @@ To run tox and generate a coverage report (in ``htmlcov`` directory)::
|
||||||
|
|
||||||
make test
|
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
|
**Please note**: Before a pull request can be merged, all tests must pass and
|
||||||
code/branch coverage in tests must be 100%.
|
code/branch coverage in tests must be 100%.
|
||||||
|
|
||||||
|
|
|
||||||
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal 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
|
||||||
Loading…
Reference in a new issue