Use the new settings in gitlab-ci

This commit is contained in:
Martin Pépin 2020-05-09 17:52:12 +02:00
parent 586df45a2f
commit 2d7cd5408b
No known key found for this signature in database
GPG key ID: E7520278B1774448

View file

@ -2,7 +2,6 @@ image: "python:3.7"
variables: variables:
# GestioCOF settings # GestioCOF settings
DJANGO_SETTINGS_MODULE: "cof.settings.prod"
DBHOST: "postgres" DBHOST: "postgres"
REDIS_HOST: "redis" REDIS_HOST: "redis"
REDIS_PASSWD: "dummy" REDIS_PASSWD: "dummy"
@ -18,8 +17,7 @@ variables:
# psql password authentication # psql password authentication
PGPASSWORD: $POSTGRES_PASSWORD PGPASSWORD: $POSTGRES_PASSWORD
test: .test_template:
stage: test
before_script: before_script:
- mkdir -p vendor/{pip,apt} - mkdir -p vendor/{pip,apt}
- apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client - 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... # Keep this disabled for now, as it may kill GitLab...
# coverage: '/TOTAL.*\s(\d+\.\d+)\%$/' # 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: linters:
stage: test stage: test
before_script: before_script:
@ -60,8 +71,7 @@ linters:
- vendor/ - vendor/
# Check whether there are some missing migrations. # Check whether there are some missing migrations.
migration_checks: .migration_checks_template:
stage: test
before_script: before_script:
- mkdir -p vendor/{pip,apt} - mkdir -p vendor/{pip,apt}
- apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client - 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 key: migration_checks
paths: paths:
- vendor/ - 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"