From c1dc7b4e8f73e550bc2b3462258eeb3962cc088b Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Wed, 17 Aug 2022 14:04:50 +0200 Subject: [PATCH] ci: add cobertura coverage report --- .gitlab-ci.yml | 5 +++++ package.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4056a4d5..cf8cae0e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,10 +83,15 @@ test: stage: test script: - npm test + coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/' artifacts: paths: - report - coverage + reports: + coverage_report: + coverage_format: cobertura + path: coverage/cobertura-coverage.xml mapping: tags: diff --git a/package.json b/package.json index f27ba192..e244a82f 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "schema": "node --max-old-space-size=8192 --stack-size=10240 ./node_modules/.bin/openstapps-core-tools schema src lib/schema", "mappings": "mkdir lib/mappings && openstapps-es-mapping-generator mapping ../core/src -i minlength,pattern,see,tjs-format -m lib/mappings/mappings.json -a lib/mappings/aggregations.json", "mappings-integration": "openstapps-es-mapping-generator put-es-templates lib/mappings/mappings.json http://elasticsearch:9200/", - "test": "nyc mocha --require ts-node/register --recursive 'test/*.spec.ts'", + "test": "nyc mocha --recursive 'test/*.spec.ts'", "tslint": "tslint -p tsconfig.json -c tslint.json 'src/**/*.ts'" }, "author": "Karl-Philipp Wulfert ", @@ -100,6 +100,7 @@ "lines": 95, "per-file": true, "reporter": [ + "cobertura", "html", "text-summary" ],