From 2130d849200ba730fad5e2eda2a94dfa187c0bba Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Mon, 22 Aug 2022 12:34:55 +0200 Subject: [PATCH] ci: fix and enhance coverage report --- .gitlab-ci.yml | 7 ++++++- karma.conf.js | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3857c410..30ef05f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,9 +60,14 @@ unit: script: - npm run check-icons - npm run test -- --watch=false --no-progress --code-coverage + coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/' artifacts: paths: - - coverage + - coverage + reports: + coverage_report: + coverage_format: cobertura + path: coverage/cobertura-coverage.xml # Disabled until redesign is settled # diff --git a/karma.conf.js b/karma.conf.js index 7b8121a9..c3a8cc70 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -32,8 +32,8 @@ module.exports = function (config) { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../coverage'), - reports: ['html', 'lcovonly', 'text-summary'], + dir: require('path').join(__dirname, './coverage'), + reports: ['html', 'lcovonly', 'text-summary', 'cobertura'], fixWebpackSourcePaths: true }, reporters: config.buildWebpack.options.codeCoverage ? ['mocha', 'coverage-istanbul'] : ['mocha'],