Commit 696b99ed authored by Colin DAMON's avatar Colin DAMON
Browse files

Fix coverage calculations

parent c26bb01a
......@@ -14,7 +14,7 @@ stages:
- cd $PROJECT_FOLDER
script:
- mvn $MAVEN_CLI_OPTS clean package
- awk -F"," '{ branches += $6 + $7; covered += $7 } END { print covered, "/", branches, "branches covered"; print 100*covered/branches, "%covered" }' target/site/jacoco/jacoco.csv
- awk -F"," '{ branches += $4 + $5 + $6 + $7; covered += $5 + $7 } END { print covered, "/", branches, "branches covered"; print 100*covered/branches, "%covered" }' target/site/jacoco/jacoco.csv
artifacts:
reports:
junit: $PROJECT_FOLDER/target/surefire-reports/TEST-*.xml
......@@ -35,7 +35,7 @@ stages:
- cd $PROJECT_FOLDER
script:
- ./mvnw -B -Pprod,swagger verify
- awk -F"," '{ branches += $6 + $7; covered += $7 } END { print covered, "/", branches, "branches covered"; print 100*covered/branches, "%covered" }' target/jacoco-aggregate/jacoco.csv
- awk -F"," '{ branches += $4 + $5 + $6 + $7; covered += $5 + $7 } END { print covered, "/", branches, "branches covered"; print 100*covered/branches, "%covered" }' target/jacoco-aggregate/jacoco.csv
artifacts:
reports:
junit: $PROJECT_FOLDER/target/test-results/**/TEST-*.xml
......
package-java-pagination-seven:
package-tcr-roman-numerals:
variables:
PROJECT_FOLDER: "tcr-roman-numerals"
extends: .java
......
......@@ -9,6 +9,8 @@ import java.util.function.Function;
public class Numerals {
private static final NavigableMap<Integer, String> CONVERSIONS = buildConversions();
private Numerals() {}
public static String toRoman(int arabic) {
return highestKnownConversion(arabic).map(toRomanRepresentation(arabic)).orElse("");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment