|
70 | 70 |
|
71 | 71 | - name: Print filtered coverage percentage |
72 | 72 | run: | |
73 | | - COVERED_LINES=$(xmllint --xpath "sum(//report/package[not(contains(@name, 'results')) and not(contains(@name, 'kicsRealtimeResults')) and not(contains(@name, 'asca')) and not(contains(@name, 'learnMore')) and not(contains(@name, 'predicate')) and not(contains(@name, 'scan')) and not(contains(@name, 'codebashing')) and not(contains(@name, 'remediation')) and not(contains(@name, 'project')) and not(contains(@name, 'tenant'))]/counter[@type='LINE']/@covered)" target/site/jacoco/jacoco.xml) |
74 | | -
|
75 | | - MISSED_LINES=$(xmllint --xpath "sum(//report/package[not(contains(@name, 'results')) and not(contains(@name, 'kicsRealtimeResults')) and not(contains(@name, 'asca')) and not(contains(@name, 'learnMore')) and not(contains(@name, 'predicate')) and not(contains(@name, 'scan')) and not(contains(@name, 'codebashing')) and not(contains(@name, 'remediation')) and not(contains(@name, 'project')) and not(contains(@name, 'tenant'))]/counter[@type='LINE']/@missed)" target/site/jacoco/jacoco.xml) |
| 73 | + COVERED_LINES=$(xmllint --xpath "sum(//report/package[ |
| 74 | + not(starts-with(@name, 'com.checkmarx.ast.results')) and |
| 75 | + not(starts-with(@name, 'com.checkmarx.ast.kicsRealtimeResults')) and |
| 76 | + not(starts-with(@name, 'com.checkmarx.ast.asca')) and |
| 77 | + not(starts-with(@name, 'com.checkmarx.ast.learnMore')) and |
| 78 | + not(starts-with(@name, 'com.checkmarx.ast.predicate')) and |
| 79 | + not(starts-with(@name, 'com.checkmarx.ast.scan')) and |
| 80 | + not(starts-with(@name, 'com.checkmarx.ast.codebashing')) and |
| 81 | + not(starts-with(@name, 'com.checkmarx.ast.remediation')) and |
| 82 | + not(starts-with(@name, 'com.checkmarx.ast.project')) and |
| 83 | + not(starts-with(@name, 'com.checkmarx.ast.tenant')) and |
| 84 | + not(starts-with(@name, 'com.checkmarx.ast.wrapper.Execution')) |
| 85 | + ]/counter[@type='LINE']/@covered)" target/site/jacoco/jacoco.xml) |
| 86 | +
|
| 87 | + MISSED_LINES=$(xmllint --xpath "sum(//report/package[ |
| 88 | + not(starts-with(@name, 'com.checkmarx.ast.results')) and |
| 89 | + not(starts-with(@name, 'com.checkmarx.ast.kicsRealtimeResults')) and |
| 90 | + not(starts-with(@name, 'com.checkmarx.ast.asca')) and |
| 91 | + not(starts-with(@name, 'com.checkmarx.ast.learnMore')) and |
| 92 | + not(starts-with(@name, 'com.checkmarx.ast.predicate')) and |
| 93 | + not(starts-with(@name, 'com.checkmarx.ast.scan')) and |
| 94 | + not(starts-with(@name, 'com.checkmarx.ast.codebashing')) and |
| 95 | + not(starts-with(@name, 'com.checkmarx.ast.remediation')) and |
| 96 | + not(starts-with(@name, 'com.checkmarx.ast.project')) and |
| 97 | + not(starts-with(@name, 'com.checkmarx.ast.tenant')) and |
| 98 | + not(starts-with(@name, 'com.checkmarx.ast.wrapper.Execution')) |
| 99 | + ]/counter[@type='LINE']/@missed)" target/site/jacoco/jacoco.xml) |
76 | 100 |
|
77 | 101 | if [ -z "$COVERED_LINES" ] || [ -z "$MISSED_LINES" ]; then |
78 | 102 | echo "Error: Could not extract coverage data from jacoco.xml" |
|
90 | 114 | echo "Filtered coverage percentage: $COVERAGE_PERCENTAGE%" |
91 | 115 | |
92 | 116 |
|
| 117 | + |
93 | 118 |
|
94 | 119 | - name: Generate JaCoCo Badge |
95 | 120 | uses: cicirello/jacoco-badge-generator@f33476a5a3fd5a4f77cb5eef2ebe728c1dd5b921 #v2.11.0 |
|
0 commit comments