From ea0808fae03d7bb51ba66cc55d6ea9fed9dd491a Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 17 May 2017 14:39:28 +0300 Subject: [PATCH] Edit GitLab build sequence --- .gitlab-ci.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6083455..f1a45ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,15 +12,24 @@ before_script: stages: - build - - lint - test + - lint build: stage: build variables: DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB" script: - - sh ./scripts/autoinstall.sh + - cp sikweb/ci-settings.py sikweb/settings.py + - python manage.py migrate --noinput + - python manage.py createdefaultadmin + +test: + stage: test + variables: + DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB" + script: + - docker-compose run web python manage.py test lint: stage: lint @@ -29,9 +38,3 @@ lint: script: - pep8 --count && eslint . -test: - stage: test - variables: - DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB" - script: - - docker-compose run web python manage.py test --settings sikweb.ci-settings