From 2d7cd5408bb2613aa75f17de62dac71d0f8b7170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sat, 9 May 2020 17:52:12 +0200 Subject: [PATCH] Use the new settings in gitlab-ci --- .gitlab-ci.yml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6bb31a5f..cf72df59 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,6 @@ image: "python:3.7" variables: # GestioCOF settings - DJANGO_SETTINGS_MODULE: "cof.settings.prod" DBHOST: "postgres" REDIS_HOST: "redis" REDIS_PASSWD: "dummy" @@ -18,8 +17,7 @@ variables: # psql password authentication PGPASSWORD: $POSTGRES_PASSWORD -test: - stage: test +.test_template: before_script: - mkdir -p vendor/{pip,apt} - apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client @@ -44,6 +42,19 @@ test: # Keep this disabled for now, as it may kill GitLab... # coverage: '/TOTAL.*\s(\d+\.\d+)\%$/' +coftest: + stage: test + extends: .test_template + variables: + DJANGO_SETTINGS_MODULE: "cof.settings.cof_prod" + +bdstest: + stage: test + extends: .test_template + variables: + DJANGO_SETTINGS_MODULE: "cof.settings.bds_prod" + + linters: stage: test before_script: @@ -60,8 +71,7 @@ linters: - vendor/ # Check whether there are some missing migrations. -migration_checks: - stage: test +.migration_checks_template: before_script: - mkdir -p vendor/{pip,apt} - apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client @@ -76,3 +86,15 @@ migration_checks: key: migration_checks paths: - vendor/ + +cof_migration_checks: + stage: test + extends: .migration_checks_template + variables: + DJANGO_SETTINGS_MODULE: "cof.settings.cof_prod" + +bds_migration_checks: + stage: test + extends: .migration_checks_template + variables: + DJANGO_SETTINGS_MODULE: "cof.settings.bds_prod"