From 70d17d7e70a67d39ea4674be222f1a5a4c8c0d06 Mon Sep 17 00:00:00 2001 From: janmax <mail-github@jmx.io> Date: Fri, 24 Nov 2017 01:52:19 +0100 Subject: [PATCH] Minor tweak to .gitlab-ci.yml to improve coverage output --- .gitlab-ci.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58afd6a8..49d5c443 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - build - test + - pages - staging variables: @@ -23,23 +24,15 @@ build_backend: before_script: - cd backend/ -test_coverage: +test_pytest: <<: *test_definition_backend services: - postgres:9.5 script: - - coverage run manage.py test --noinput - - coverage html + - DJANGO_SETTINGS_MODULE=grady.settings pytest --cov artifacts: paths: - - public/ - -test_pytest: - <<: *test_definition_backend - services: - - postgres:9.5 - script: - - DJANGO_SETTINGS_MODULE=grady.settings pytest + - .coverage test_prospector: <<: *test_definition_backend @@ -59,6 +52,20 @@ test_frontend: - yarn install - yarn test --single-run +# ============================ Gitlab pages section =========================== # +test_coverage: + <<: *test_definition_backend + stage: + pages + script: + - mkdir public + - coverage html + dependencies: + - test_pytest + artifacts: + paths: + - public + # ============================== Staging section ============================= # .staging_template: &staging_definition stage: staging -- GitLab