diff options
author | 2018-08-30 20:02:09 +0200 | |
---|---|---|
committer | 2018-08-30 20:42:05 +0200 | |
commit | 37ff9fe6cdc6fff84ccda6c5d610a521288d99ce (patch) | |
tree | c6e2def3acee7ea83f37cae7ae55044d7c52199b /.gitlab-ci.yml | |
parent | Add CI build script. (diff) |
Proeprly set up lint and test stages.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 24 |
1 files changed, 22 insertions, 2 deletions
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 |