From 69585159a6e913738eaa2dbae16dfe20a422e738 Mon Sep 17 00:00:00 2001 From: Bram Wiepjes <bramw@protonmail.com> Date: Thu, 11 Jul 2019 19:04:19 +0200 Subject: [PATCH] added postgres to backend pytest gitlab ci --- .gitlab-ci.yml | 7 +++++++ backend/src/baserow/config/settings/test.py | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85722a847..91d41a000 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,6 +35,13 @@ backend-flake8: backend-pytest: stage: test image: python:3.6 + services: + - name: postgres:11.3 + alias: db + variables: + POSTGRES_USER: baserow + POSTGRES_PASSWORD: baserow + POSTGRES_DB: baserow script: - make install-backend-dependencies - export PYTHONPATH=$CI_PROJECT_DIR/backend/src diff --git a/backend/src/baserow/config/settings/test.py b/backend/src/baserow/config/settings/test.py index b415fb071..a48cc3f86 100644 --- a/backend/src/baserow/config/settings/test.py +++ b/backend/src/baserow/config/settings/test.py @@ -1 +1,13 @@ from .base import * # noqa: F403, F401 + + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'baserow', + 'USER': 'baserow', + 'PASSWORD': 'baserow', + 'HOST': 'db', + 'PORT': '5432', + } +}