summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.gitlab-ci.yml70
1 files changed, 59 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1543f14..6be9bf4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,6 +7,7 @@ include:
stages:
- ci-test
+ - aggregate-coverage
- pages
- provisioning
- build
@@ -29,42 +30,89 @@ tests-unstable:
- apt-get build-dep -Ppkg.debputy.ci -y .
- dpkg-buildpackage -Ppkg.debputy.ci -us -uc -tc
-tests-unstable-without-optional-bd:
+tests-unstable-coverage-without-optional-bd:
stage: ci-test
image: debian:unstable
script:
- apt-get update
- - apt-get build-dep -Ppkg.debputy.minimal-tests -y .
+ - apt-get build-dep -Ppkg.debputy.minimal-tests,pkg.debputy.test-coverage -y .
+ - py.test-3 -v --cov --cov-branch --doctest-modules --junit-xml=xunit-report.xml --cov-report xml:coverage.xml
- dpkg-buildpackage -Ppkg.debputy.minimal-tests -us -uc -tc
+ after_script:
+ - mkdir -p coverage-results/tests-unstable-coverage-without-optional-bd
+ - cp .coverage coverage-results/tests-unstable-coverage-without-optional-bd/coverage
+ artifacts:
+ paths:
+ - coverage-results/tests-unstable-coverage-without-optional-bd
+ reports:
+ junit: xunit-report.xml
+ coverage_report:
+ coverage_format: cobertura
+ path: coverage.xml
tests-unstable-coverage:
stage: ci-test
image: debian:unstable
- coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
script:
- apt-get update
- - apt-get build-dep -y .
- - apt-get install -y python3-pytest-cov
- - PYTHONPATH=. py.test-3 -v --cov --cov-branch --doctest-modules --junit-xml=xunit-report.xml --cov-report term --cov-report html:htmlcov --cov-report xml:coverage.xml
+ - apt-get build-dep -Ppkg.debputy.test-coverage -y .
+ - py.test-3 -v --cov --cov-branch --doctest-modules --junit-xml=xunit-report.xml --cov-report xml:coverage.xml
+ after_script:
+ - mkdir -p coverage-results/tests-unstable-coverage
+ - cp .coverage coverage-results/tests-unstable-coverage/coverage
+ artifacts:
+ paths:
+ - coverage-results/tests-unstable-coverage
+ reports:
+ junit: xunit-report.xml
+ coverage_report:
+ coverage_format: cobertura
+ path: coverage.xml
+
+tests-unstable-coverage-with-extra-bd:
+ stage: ci-test
+ image: debian:unstable
+ script:
+ - apt-get update
+ - apt-get build-dep -Ppkg.debputy.ci,pkg.debputy.test-coverage -y .
+ - py.test-3 -v --cov --cov-branch --doctest-modules --junit-xml=xunit-report.xml --cov-report xml:coverage.xml
after_script:
- - apt-get install python3-coverage
- - python3-coverage html
+ - mkdir -p coverage-results/tests-unstable-coverage-with-extra-bd
+ - cp .coverage coverage-results/tests-unstable-coverage-with-extra-bd/coverage
artifacts:
paths:
- - htmlcov
+ - coverage-results/tests-unstable-coverage-with-extra-bd
reports:
junit: xunit-report.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
+aggregate-coverage:
+ stage: aggregate-coverage
+ image: debian:unstable
+ coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
+ script:
+ - apt-get update -y
+ - apt-get install -y python3-coverage
+ - python3-coverage combine coverage-results/*/coverage*
+ - python3-coverage html -d coverage-report
+ - python3-coverage report
+ artifacts:
+ paths:
+ - coverage-report
+ dependencies:
+ - tests-unstable-coverage
+ - tests-unstable-coverage-without-optional-bd
+ - tests-unstable-coverage-with-extra-bd
+
pages:
stage: pages
script:
- mkdir public
- - mv htmlcov public/
+ - mv coverage-report public/
dependencies:
- - tests-unstable-coverage
+ - aggregate-coverage
artifacts:
paths:
- public