11name : ' Quality Monitor PR'
22
33on :
4- pull_request_target :
4+ pull_request :
55
66jobs :
77 build :
1111
1212 steps :
1313 - uses : actions/checkout@v4
14- with :
15- ref : " refs/pull/${{ github.event.number }}/merge"
1614 - name : Set up JDK 21
1715 uses : actions/setup-java@v4
1816 with :
@@ -24,29 +22,36 @@ jobs:
2422 uses : stCarolas/setup-maven@v5
2523 with :
2624 maven-version : 3.9.9
25+ - name : Cache the NVD database
26+ uses : actions/cache@v4
27+ with :
28+ path : ~/.m2/repository/org/owasp/dependency-check-data
29+ key : dependency-check
2730 - name : Build with Maven
2831 env :
2932 BROWSER : chrome-container
30- run : mvn -V --color always -ntp clean verify -Ppit -Pci | tee maven.log
33+ NVD_API_KEY : ${{ secrets.NVD_API_KEY }}
34+ run : mvn -V --color always -ntp clean verify -Ppit -Pci -Powasp | tee maven.log
3135 - name : Extract pull request number
3236 uses : jwalton/gh-find-current-pr@v1
3337 id : pr
3438 - name : Run Quality Monitor
35- uses : uhafner/quality-monitor@v1
39+ uses : uhafner/quality-monitor@v2
3640 with :
3741 github-token : ${{ secrets.GITHUB_TOKEN }}
3842 pr-number : ${{ steps.pr.outputs.number }}
43+ show-headers : true
3944 config : >
4045 {
4146 "tests": {
47+ "name": "Tests",
4248 "tools": [
4349 {
44- "id": "test ",
45- "name": "Tests",
50+ "id": "junit ",
51+ "name": "JUnit Tests",
4652 "pattern": "**/target/*-reports/TEST*.xml"
4753 }
48- ],
49- "name": "Tests"
54+ ]
5055 },
5156 "analysis": [
5257 {
7277 "id": "spotbugs",
7378 "sourcePath": "src/main/java",
7479 "pattern": "**/target/spotbugsXml.xml"
80+ },
81+ {
82+ "id": "error-prone",
83+ "pattern": "**/maven.log"
84+ }
85+ ]
86+ },
87+ {
88+ "name": "API Problems",
89+ "id": "api",
90+ "icon": "no_entry_sign",
91+ "tools": [
92+ {
93+ "id": "revapi",
94+ "sourcePath": "src/main/java",
95+ "pattern": "**/target/revapi-result.json"
96+ }
97+ ]
98+ },
99+ {
100+ "name": "Vulnerabilities",
101+ "id": "vulnerabilities",
102+ "icon": "shield",
103+ "tools": [
104+ {
105+ "id": "owasp-dependency-check",
106+ "pattern": "**/target/dependency-check-report.json"
75107 }
76108 ]
77109 }
@@ -82,90 +114,74 @@ jobs:
82114 "tools": [
83115 {
84116 "id": "jacoco",
85- "name": "Line Coverage",
86117 "metric": "line",
87118 "sourcePath": "src/main/java",
88119 "pattern": "**/target/site/jacoco/jacoco.xml"
89120 },
90121 {
91122 "id": "jacoco",
92- "name": "Branch Coverage",
93123 "metric": "branch",
94124 "sourcePath": "src/main/java",
95125 "pattern": "**/target/site/jacoco/jacoco.xml"
96126 }
97127 ]
128+ },
129+ {
130+ "name": "Mutation Coverage",
131+ "tools": [
132+ {
133+ "id": "pit",
134+ "metric": "mutation",
135+ "sourcePath": "src/main/java",
136+ "pattern": "**/target/pit-reports/mutations.xml"
137+ },
138+ {
139+ "id": "pit",
140+ "metric": "test-strength",
141+ "sourcePath": "src/main/java",
142+ "pattern": "**/target/pit-reports/mutations.xml"
143+ }
144+ ]
98145 }
99146 ],
100147 "metrics":
101148 {
102- "name": "Toplevel Metrics",
149+ "name": "Software Metrics",
103150 "tools": [
104151 {
105- "name": "Cyclomatic Complexity",
106152 "id": "metrics",
107153 "pattern": "**/metrics/pmd.xml",
108154 "metric": "CYCLOMATIC_COMPLEXITY"
109155 },
110156 {
111- "name": "Cognitive Complexity",
112157 "id": "metrics",
113158 "pattern": "**/metrics/pmd.xml",
114159 "metric": "COGNITIVE_COMPLEXITY"
115160 },
116161 {
117- "name": "Lines of Code",
118162 "id": "metrics",
119163 "pattern": "**/metrics/pmd.xml",
120- "metric": "LOC "
164+ "metric": "NPATH_COMPLEXITY "
121165 },
122166 {
123- "name": "Non Commenting Source Statements",
124167 "id": "metrics",
125168 "pattern": "**/metrics/pmd.xml",
126- "metric": "NCSS "
169+ "metric": "LOC "
127170 },
128171 {
129- "name": "Access to foreign data",
130172 "id": "metrics",
131173 "pattern": "**/metrics/pmd.xml",
132- "metric": "ACCESS_TO_FOREIGN_DATA "
174+ "metric": "NCSS "
133175 },
134176 {
135- "name": "Class cohesion",
136177 "id": "metrics",
137178 "pattern": "**/metrics/pmd.xml",
138179 "metric": "COHESION"
139180 },
140181 {
141- "name": "Fan out",
142- "id": "metrics",
143- "pattern": "**/metrics/pmd.xml",
144- "metric": "FAN_OUT"
145- },
146- {
147- "name": "Number of accessors",
148- "id": "metrics",
149- "pattern": "**/metrics/pmd.xml",
150- "metric": "NUMBER_OF_ACCESSORS"
151- },
152- {
153- "name": "Weight of a class",
154182 "id": "metrics",
155183 "pattern": "**/metrics/pmd.xml",
156184 "metric": "WEIGHT_OF_CLASS"
157- },
158- {
159- "name": "Weighted method count",
160- "id": "metrics",
161- "pattern": "**/metrics/pmd.xml",
162- "metric": "WEIGHED_METHOD_COUNT"
163- },
164- {
165- "name": "N-Path Complexity",
166- "id": "metrics",
167- "pattern": "**/metrics/pmd.xml",
168- "metric": "NPATH_COMPLEXITY"
169185 }
170186 ]
171187 }
0 commit comments