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- if : github.event_name == 'push'
15- - uses : actions/checkout@v4
16- with :
17- ref : " ${{ github.event.pull_request.merge_commit_sha }}"
18- if : github.event_name == 'pull_request_target'
1914 - name : Set up JDK 21
2015 uses : actions/setup-java@v4
2116 with :
@@ -41,21 +36,22 @@ jobs:
4136 uses : jwalton/gh-find-current-pr@v1
4237 id : pr
4338 - name : Run Quality Monitor
44- uses : uhafner/quality-monitor@v1
39+ uses : uhafner/quality-monitor@v2
4540 with :
4641 github-token : ${{ secrets.GITHUB_TOKEN }}
4742 pr-number : ${{ steps.pr.outputs.number }}
43+ show-headers : true
4844 config : >
4945 {
5046 "tests": {
47+ "name": "Tests",
5148 "tools": [
5249 {
53- "id": "test ",
54- "name": "Tests",
50+ "id": "junit ",
51+ "name": "JUnit Tests",
5552 "pattern": "**/target/*-reports/TEST*.xml"
5653 }
57- ],
58- "name": "Tests"
54+ ]
5955 },
6056 "analysis": [
6157 {
8884 }
8985 ]
9086 },
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+ },
9199 {
92100 "name": "Vulnerabilities",
93101 "id": "vulnerabilities",
@@ -106,14 +114,12 @@ jobs:
106114 "tools": [
107115 {
108116 "id": "jacoco",
109- "name": "Line Coverage",
110117 "metric": "line",
111118 "sourcePath": "src/main/java",
112119 "pattern": "**/target/site/jacoco/jacoco.xml"
113120 },
114121 {
115122 "id": "jacoco",
116- "name": "Branch Coverage",
117123 "metric": "branch",
118124 "sourcePath": "src/main/java",
119125 "pattern": "**/target/site/jacoco/jacoco.xml"
@@ -125,14 +131,12 @@ jobs:
125131 "tools": [
126132 {
127133 "id": "pit",
128- "name": "Mutation Coverage",
129134 "metric": "mutation",
130135 "sourcePath": "src/main/java",
131136 "pattern": "**/target/pit-reports/mutations.xml"
132137 },
133138 {
134139 "id": "pit",
135- "name": "Test Strength",
136140 "metric": "test-strength",
137141 "sourcePath": "src/main/java",
138142 "pattern": "**/target/pit-reports/mutations.xml"
@@ -142,73 +146,42 @@ jobs:
142146 ],
143147 "metrics":
144148 {
145- "name": "Toplevel Metrics",
149+ "name": "Software Metrics",
146150 "tools": [
147151 {
148- "name": "Cyclomatic Complexity",
149152 "id": "metrics",
150153 "pattern": "**/metrics/pmd.xml",
151154 "metric": "CYCLOMATIC_COMPLEXITY"
152155 },
153156 {
154- "name": "Cognitive Complexity",
155157 "id": "metrics",
156158 "pattern": "**/metrics/pmd.xml",
157159 "metric": "COGNITIVE_COMPLEXITY"
158160 },
159161 {
160- "name": "Lines of Code",
161162 "id": "metrics",
162163 "pattern": "**/metrics/pmd.xml",
163- "metric": "LOC "
164+ "metric": "NPATH_COMPLEXITY "
164165 },
165166 {
166- "name": "Non Commenting Source Statements",
167167 "id": "metrics",
168168 "pattern": "**/metrics/pmd.xml",
169- "metric": "NCSS "
169+ "metric": "LOC "
170170 },
171171 {
172- "name": "Access to foreign data",
173172 "id": "metrics",
174173 "pattern": "**/metrics/pmd.xml",
175- "metric": "ACCESS_TO_FOREIGN_DATA "
174+ "metric": "NCSS "
176175 },
177176 {
178- "name": "Class cohesion",
179177 "id": "metrics",
180178 "pattern": "**/metrics/pmd.xml",
181179 "metric": "COHESION"
182180 },
183181 {
184- "name": "Fan out",
185- "id": "metrics",
186- "pattern": "**/metrics/pmd.xml",
187- "metric": "FAN_OUT"
188- },
189- {
190- "name": "Number of accessors",
191- "id": "metrics",
192- "pattern": "**/metrics/pmd.xml",
193- "metric": "NUMBER_OF_ACCESSORS"
194- },
195- {
196- "name": "Weight of a class",
197182 "id": "metrics",
198183 "pattern": "**/metrics/pmd.xml",
199184 "metric": "WEIGHT_OF_CLASS"
200- },
201- {
202- "name": "Weighted method count",
203- "id": "metrics",
204- "pattern": "**/metrics/pmd.xml",
205- "metric": "WEIGHED_METHOD_COUNT"
206- },
207- {
208- "name": "N-Path Complexity",
209- "id": "metrics",
210- "pattern": "**/metrics/pmd.xml",
211- "metric": "NPATH_COMPLEXITY"
212185 }
213186 ]
214187 }
0 commit comments