From d95dcfb03877d93fe63a95c18f6d5d0355e4fdb0 Mon Sep 17 00:00:00 2001 From: Konstantin Schaper Date: Mon, 18 May 2020 12:04:16 +0200 Subject: [PATCH 1/4] Exclude frontend unit tests from sonar qube code coverage --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index f36487867c..d31b19a89c 100644 --- a/pom.xml +++ b/pom.xml @@ -954,6 +954,7 @@ **/*StoreFactory.java,**/*UserPassword.js ./scm-ui/target/frontend/buildfrontend-node/node-v${nodejs.version}-linux-x64/bin/node + **/*.test.ts From 448dfb45119833eb87fd9586c85f96cf65960d66 Mon Sep 17 00:00:00 2001 From: Konstantin Schaper Date: Tue, 19 May 2020 08:03:33 +0200 Subject: [PATCH 2/4] Exclude frontend unit tests from sonar qube code coverage --- Jenkinsfile | 1 + pom.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c6415c158c..666ca23869 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -199,6 +199,7 @@ Maven setupMavenBuild() { def logConf = "scm-webapp/src/main/resources/logback.ci.xml" mvn.additionalArgs += " -Dlogback.configurationFile=${logConf}" mvn.additionalArgs += " -Dscm-it.logbackConfiguration=${logConf}" + mvn.additionalArgs += " -Dsonar.coverage.exclusions=**/*.test.ts,**/*.test.tsx" if (isMainBranch() || isReleaseBranch()) { // Release starts javadoc, which takes very long, so do only for certain branches diff --git a/pom.xml b/pom.xml index d31b19a89c..84db3eba31 100644 --- a/pom.xml +++ b/pom.xml @@ -954,7 +954,7 @@ **/*StoreFactory.java,**/*UserPassword.js ./scm-ui/target/frontend/buildfrontend-node/node-v${nodejs.version}-linux-x64/bin/node - **/*.test.ts + **/*.test.ts,**/*.test.tsx From ead2efdd416f115956f01dd882bc706f7336c585 Mon Sep 17 00:00:00 2001 From: Konstantin Schaper Date: Tue, 19 May 2020 08:32:14 +0200 Subject: [PATCH 3/4] Remove non-functional code coverage configuration from pom --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 84db3eba31..f36487867c 100644 --- a/pom.xml +++ b/pom.xml @@ -954,7 +954,6 @@ **/*StoreFactory.java,**/*UserPassword.js ./scm-ui/target/frontend/buildfrontend-node/node-v${nodejs.version}-linux-x64/bin/node - **/*.test.ts,**/*.test.tsx From 5f2a049c165b80ac01616af6b46259882893b36c Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Tue, 19 May 2020 10:48:04 +0200 Subject: [PATCH 4/4] do not measure coverage for frontend stories --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 666ca23869..22005b2d01 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -199,7 +199,7 @@ Maven setupMavenBuild() { def logConf = "scm-webapp/src/main/resources/logback.ci.xml" mvn.additionalArgs += " -Dlogback.configurationFile=${logConf}" mvn.additionalArgs += " -Dscm-it.logbackConfiguration=${logConf}" - mvn.additionalArgs += " -Dsonar.coverage.exclusions=**/*.test.ts,**/*.test.tsx" + mvn.additionalArgs += " -Dsonar.coverage.exclusions=**/*.test.ts,**/*.test.tsx,**/*.stories.tsx" if (isMainBranch() || isReleaseBranch()) { // Release starts javadoc, which takes very long, so do only for certain branches