1
1
name : ' Quality Monitor PR'
2
2
3
3
on :
4
- pull_request_target :
4
+ pull_request :
5
5
6
6
jobs :
7
7
build :
11
11
12
12
steps :
13
13
- 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'
19
14
- name : Set up JDK 21
20
15
uses : actions/setup-java@v4
21
16
with :
@@ -41,21 +36,22 @@ jobs:
41
36
uses : jwalton/gh-find-current-pr@v1
42
37
id : pr
43
38
- name : Run Quality Monitor
44
- uses : uhafner/quality-monitor@v1
39
+ uses : uhafner/quality-monitor@v2
45
40
with :
46
41
github-token : ${{ secrets.GITHUB_TOKEN }}
47
42
pr-number : ${{ steps.pr.outputs.number }}
43
+ show-headers : true
48
44
config : >
49
45
{
50
46
"tests": {
47
+ "name": "Tests",
51
48
"tools": [
52
49
{
53
- "id": "test ",
54
- "name": "Tests",
50
+ "id": "junit ",
51
+ "name": "JUnit Tests",
55
52
"pattern": "**/target/*-reports/TEST*.xml"
56
53
}
57
- ],
58
- "name": "Tests"
54
+ ]
59
55
},
60
56
"analysis": [
61
57
{
88
84
}
89
85
]
90
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
+ },
91
99
{
92
100
"name": "Vulnerabilities",
93
101
"id": "vulnerabilities",
@@ -106,14 +114,12 @@ jobs:
106
114
"tools": [
107
115
{
108
116
"id": "jacoco",
109
- "name": "Line Coverage",
110
117
"metric": "line",
111
118
"sourcePath": "src/main/java",
112
119
"pattern": "**/target/site/jacoco/jacoco.xml"
113
120
},
114
121
{
115
122
"id": "jacoco",
116
- "name": "Branch Coverage",
117
123
"metric": "branch",
118
124
"sourcePath": "src/main/java",
119
125
"pattern": "**/target/site/jacoco/jacoco.xml"
@@ -125,14 +131,12 @@ jobs:
125
131
"tools": [
126
132
{
127
133
"id": "pit",
128
- "name": "Mutation Coverage",
129
134
"metric": "mutation",
130
135
"sourcePath": "src/main/java",
131
136
"pattern": "**/target/pit-reports/mutations.xml"
132
137
},
133
138
{
134
139
"id": "pit",
135
- "name": "Test Strength",
136
140
"metric": "test-strength",
137
141
"sourcePath": "src/main/java",
138
142
"pattern": "**/target/pit-reports/mutations.xml"
@@ -142,73 +146,42 @@ jobs:
142
146
],
143
147
"metrics":
144
148
{
145
- "name": "Toplevel Metrics",
149
+ "name": "Software Metrics",
146
150
"tools": [
147
151
{
148
- "name": "Cyclomatic Complexity",
149
152
"id": "metrics",
150
153
"pattern": "**/metrics/pmd.xml",
151
154
"metric": "CYCLOMATIC_COMPLEXITY"
152
155
},
153
156
{
154
- "name": "Cognitive Complexity",
155
157
"id": "metrics",
156
158
"pattern": "**/metrics/pmd.xml",
157
159
"metric": "COGNITIVE_COMPLEXITY"
158
160
},
159
161
{
160
- "name": "Lines of Code",
161
162
"id": "metrics",
162
163
"pattern": "**/metrics/pmd.xml",
163
- "metric": "LOC "
164
+ "metric": "NPATH_COMPLEXITY "
164
165
},
165
166
{
166
- "name": "Non Commenting Source Statements",
167
167
"id": "metrics",
168
168
"pattern": "**/metrics/pmd.xml",
169
- "metric": "NCSS "
169
+ "metric": "LOC "
170
170
},
171
171
{
172
- "name": "Access to foreign data",
173
172
"id": "metrics",
174
173
"pattern": "**/metrics/pmd.xml",
175
- "metric": "ACCESS_TO_FOREIGN_DATA "
174
+ "metric": "NCSS "
176
175
},
177
176
{
178
- "name": "Class cohesion",
179
177
"id": "metrics",
180
178
"pattern": "**/metrics/pmd.xml",
181
179
"metric": "COHESION"
182
180
},
183
181
{
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",
197
182
"id": "metrics",
198
183
"pattern": "**/metrics/pmd.xml",
199
184
"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"
212
185
}
213
186
]
214
187
}
0 commit comments