diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 684afddb2..3b6f44ea6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ cache: - _ccache/ variables: - FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v18" + FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v19" COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7" DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v13" MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v9" @@ -482,6 +482,10 @@ coverage: paths: - _coverage/coverage/index.html - _coverage + reports: + coverage_report: + coverage_format: cobertura + path: _coverage/*-cobertura/cobertura-*.xml before_script: - bash .gitlab-ci/show-execution-environment.sh script: diff --git a/.gitlab-ci/coverage-docker.sh b/.gitlab-ci/coverage-docker.sh index df3273fa0..0b9abc017 100755 --- a/.gitlab-ci/coverage-docker.sh +++ b/.gitlab-ci/coverage-docker.sh @@ -10,6 +10,14 @@ for path in _coverage/*.lcov; do lcov --config-file .lcovrc -r "${path}" '*/_build/*' -o "$(pwd)/${path}" # Remove any coverage from system files lcov --config-file .lcovrc -e "${path}" "$(pwd)/*" -o "$(pwd)/${path}" + + # Convert to cobertura format for gitlab integration + cobertura_base="${path/.lcov}-cobertura" + cobertura_xml="${cobertura_base}.xml" + lcov_cobertura "${path}" --output "${cobertura_xml}" + mkdir -p "${cobertura_base}" + cobertura-split-by-package.py "${cobertura_xml}" "${cobertura_base}" + rm -f "${cobertura_xml}" done genhtml \