Skip to content
Snippets Groups Projects
Commit 01e4942a authored by Neda Moeini's avatar Neda Moeini Committed by Neda Moeini
Browse files

Added postgres service to the gitlab-ci.

parent 59a09c25
No related branches found
No related tags found
1 merge request!60Feature/nat 217 import sites
Pipeline #83892 passed
......@@ -13,9 +13,16 @@ run-tox-pipeline:
- docker-executor
image: python:3.10
services:
- postgres:15.4
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
POSTGRES_DB: gso-test-db
POSTGRES_USER: gso
POSTGRES_PASSWORD: gso
DATABASE_URI_TEST: 'postgresql://gso:gso@postgres:5432/gso-test-db'
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
......
......@@ -93,7 +93,7 @@ def data_config_filename(configuration_data) -> str:
def db_uri():
"""Provide the database uri configuration to run the migration on."""
return os.environ.get("DATABASE_URI_TEST", "postgresql://nwa:nwa@localhost/nwa-workflows-test")
return os.environ.get("DATABASE_URI_TEST", "postgresql://gso:gos@localhost/gso-test-db")
def run_migrations(db_uri: str) -> None:
......
......@@ -8,6 +8,7 @@ max-line-length = 120
ban-relative-imports = true
[testenv]
passenv = DATABASE_URI_TEST
deps =
coverage
flake8
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment