Skip to content
Snippets Groups Projects
Commit 2e504e47 authored by Carlos Vega's avatar Carlos Vega
Browse files

added gitlab CI job for testing mariadb

parent 5be8c5fc
No related branches found
No related tags found
2 merge requests!462Redcap/generic test instance,!461Db/mariadb
env*
smash/*.txt
smash/*.sqlite3
**/*.pyc
.vscode/*
Dockerfile
......
......@@ -7,6 +7,9 @@ variables:
POSTGRES_DB: smash
POSTGRES_USER: runner
POSTGRES_PASSWORD: password
MARIADB_USER: runner
MARIADB_PASSWORD: password
MARIADB_DATABASE: smash
gemnasium-python-dependency_scanning:
before_script:
......@@ -44,6 +47,17 @@ test_postgres:
- coverage run --source web manage.py test -v3
- coverage report -m --omit="*/test*,*/migrations*,*debug_utils*"
test_mariadb:
<<: *test_definition
services:
- mariadb:10.6-ubi
script:
- cp "local_settings_ci_mariadb.py" "smash/smash/local_settings.py"
- cd smash
- coverage run --source web manage.py test -v3
- coverage report -m --omit="*/test*,*/migrations*,*debug_utils*"
test_sqlite:
<<: *test_definition
script:
......
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "Paste long random string here" # Insert long random string
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"NAME": "smaschdb",
"USER": "runner",
"PASSWORD": "password",
"HOST": "mariadb",
"PORT": "",
}
}
STATIC_ROOT = (
"/tmp/static" # Warning! `/tmp` directory can be flushed in any moment; use a persistent one; e.g. ~/tmp/static
)
MEDIA_ROOT = (
"/tmp/media" # Warning! `/tmp` directory can be flushed in any moment; use a persistent one, e.g. ~/tmp/media
)
UPLOAD_ROOT = "/tmp/upload"
ETL_ROOT = "/tmp/etl"
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
ALLOWED_HOSTS = ["127.0.0.1", "localhost"]
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