diff options
author | 2018-08-30 21:23:35 +0200 | |
---|---|---|
committer | 2018-08-30 21:28:49 +0200 | |
commit | f7fadfd8e7800545ab89accf0f650f8d546d4350 (patch) | |
tree | ed2b451682b8407e2eee592522376742c5d7c40e /.gitlab-ci.yml | |
parent | Remove no longer needed conditional. (diff) |
Add coverage reports.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b413115..cec84074 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ stages: - build - lint - test + - deploy build base image: image: docker:stable-git @@ -26,11 +27,36 @@ test: stage: test services: - postgres:10-alpine - script: + before_script: - python manage.py migrate - - python manage.py test + - pip install coverage + script: + - coverage run --source=api,home,pysite,wiki --branch manage.py test + after_script: + - coverage report + artifacts: + paths: + - .coverage variables: DATABASE_URL: postgres://django:supersecret@postgres/pysite POSTGRES_DB: pysite POSTGRES_PASSWORD: supersecret POSTGRES_USER: django + +pages: + stage: deploy + image: + dependencies: + - test + before_script: + - pip install coverage + script: + - coverage html --directory=public + artifacts: + paths: + - public + expire_in: 30 days + only: + - master + - django + - django+add-gitlab-ci |