From 35b4b6c8237a167518f0edb7326578095c935764 Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Wed, 17 Aug 2022 11:45:04 +0200 Subject: [PATCH] feat: add proper coverage to ci templates --- src/common.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/common.ts b/src/common.ts index 18e84359..faa528a0 100644 --- a/src/common.ts +++ b/src/common.ts @@ -725,7 +725,7 @@ export function getRules(configuration: Configuration): Rules { 'include': ['src'], 'lines': 95, 'per-file': true, - 'reporter': ['html', 'text-summary'], + 'reporter': ['cobertura', 'html', 'text-summary'], 'require': ['ts-node/register'], 'statements': 95, }; @@ -758,6 +758,15 @@ export function getRules(configuration: Configuration): Rules { 'npm test': { stage: 'test', script: ['npm run test'], + coverage: '/Statements[^:]*\\:[^:]*\\s+([\\d\\.]+)%/', + artifacts: { + reports: { + coverage_report: { + coverage_format: 'cobertura', + path: 'coverage/cobertura-coverage.xml', + }, + }, + }, }, 'npm audit': { allow_failure: true,