Skip to content
Snippets Groups Projects
Commit 4b64491a authored by Robbie Luijben's avatar Robbie Luijben
Browse files

Add settings, docker compose and gitlab config for running tests

parent f1d7b84d
No related branches found
No related tags found
1 merge request!326bugfix, didn't consider rfi_percent = 0 a valid RFI
stages:
- test
- build
- deploy_to_test
- deploy_to_production
......@@ -18,6 +19,22 @@ docker-build:
# - master
test-code:
image: python:3.10
stage: test
services:
- postgres:14.0
variables:
POSTGRES_DB: atdb_ldv_ci
POSTGRES_USER: atdb_admin_ci
POSTGRES_PASSWORD: "atdb123_ci"
script:
- cd atdb
- pip install -r requirements/dev.txt
- python manage.py migrate --settings atdb.settings.ci
- python manage.py test --settings atdb.settings.ci
# deploy to 'sdc-dev.astron.nl'
docker-deploy-to-test:
image: docker:latest
......
from atdb.settings.base import *
import os
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'USER': 'atdb_admin_ci',
'PASSWORD': 'atdb123_ci',
'NAME': 'atdb_ldv_ci',
'HOST': 'localhost',
'PORT': '5555',
},
}
\ No newline at end of file
version: '3.4'
services:
atdb-ldv-db:
image: postgres:14
container_name: atdb-ldv-ci
expose:
- "5432"
ports:
- "5555:5432"
environment:
POSTGRES_PASSWORD: atdb123_ci
POSTGRES_USER: atdb_admin_ci
POSTGRES_DB: atdb_ldv_ci
python manage.py test --settings atdb.settings.ci
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