From 1f3e0496079ec2e57842b3abb7aea1630bf47f9e Mon Sep 17 00:00:00 2001 From: gabrielgio Date: Sun, 18 Jul 2021 20:19:44 +0200 Subject: ref: Split test and coverage Split `test` into two different jobs: `test` and `coverage`. --- .gitlab-ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 795dbfb..a951333 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ stages: - build docker-build-master: + needs: [ "test", "coverage" ] image: docker:latest stage: build services: @@ -17,6 +18,7 @@ docker-build-master: - master docker-build: + needs: [ "test", "coverage" ] image: docker:latest stage: build services: @@ -37,9 +39,17 @@ test: script: - pip install -r dev-requirements.txt - pytest -n 4 --junitxml=report.xml + artifacts: + reports: + junit: report.xml + +coverage: + image: python:3-alpine + stage: test + script: + - pip install -r dev-requirements.txt - coverage run -m pytest - coverage xml -o cobertura.xml artifacts: reports: cobertura: cobertura.xml - junit: report.xml -- cgit v1.2.3