From 37ff9fe6cdc6fff84ccda6c5d610a521288d99ce Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Thu, 30 Aug 2018 20:02:09 +0200 Subject: Proeprly set up lint and test stages. --- .gitlab-ci.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fe86b32c..c8bcb91e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,11 @@ +stages: + - build + - lint + - test + build base image: image: docker:stable-git + stage: build script: - sh scripts/deploy-ci.sh tags: @@ -10,7 +16,21 @@ build base image: - django+add-gitlab-ci lint: - image: pythondiscord/django-site-ci:latest + image: registry.gitlab.com/python-discord/projects/site/django-base:latest + stage: lint script: - - pipenv install --system --dev + - pipenv install --dev --system - flake8 + +test: + image: registry.gitlab.com/python-discord/projects/site/django-base:latest + stage: test + services: + - postgres:10-alpine + script: + - pipenv run manage.py test + variables: + DATABASE_URL: postgres://django:supersecret@postgres/pysite + POSTGRES_DB: pysite + POSTGRES_PASSWORD: supersecret + POSTGRES_USER: django -- cgit v1.2.3