Skip to content

Commit 3cb17bf

Browse files
committed
Synchronize CI pipelines
1 parent bb33e12 commit 3cb17bf

File tree

4 files changed

+27
-69
lines changed

4 files changed

+27
-69
lines changed

.github/quality-monitor.yml

+23-50
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 'Quality Monitor PR'
22

33
on:
4-
pull_request_target:
4+
pull_request:
55

66
jobs:
77
build:
@@ -11,11 +11,6 @@ jobs:
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
{
@@ -88,6 +84,18 @@ jobs:
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
}

.github/workflows/ci.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request_target:
7+
pull_request:
88

99
jobs:
1010
build:
@@ -19,11 +19,6 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22-
if: github.event_name == 'push'
23-
- uses: actions/checkout@v4
24-
with:
25-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
26-
if: github.event_name == 'pull_request_target'
2722
- name: Set up JDK ${{ matrix.jdk }}
2823
uses: actions/setup-java@v4
2924
with:

.github/workflows/codeql.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request_target:
7+
pull_request:
88
schedule:
99
- cron: "32 3 * * 0"
1010

@@ -24,11 +24,6 @@ jobs:
2424

2525
steps:
2626
- uses: actions/checkout@v4
27-
if: github.event_name == 'push'
28-
- uses: actions/checkout@v4
29-
with:
30-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
31-
if: github.event_name == 'pull_request_target'
3227

3328
- name: Setup Java
3429
uses: actions/setup-java@v4

.github/workflows/coverage.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request_target:
7+
pull_request:
88

99
jobs:
1010
coverage:
@@ -14,11 +14,6 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v4
17-
if: github.event_name == 'push'
18-
- uses: actions/checkout@v4
19-
with:
20-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
21-
if: github.event_name == 'pull_request_target'
2217
- name: Set up JDK 21
2318
uses: actions/setup-java@v4
2419
with:
@@ -33,7 +28,7 @@ jobs:
3328
- name: Generate coverage with JaCoCo
3429
run: mvn -V --color always -ntp clean verify -Pci
3530
- name: Upload coverage to Codecov
36-
uses: codecov/codecov-action@v5.3.1
31+
uses: codecov/codecov-action@v5.0.7
3732
with:
3833
file: 'target/site/jacoco/jacoco.xml'
3934
disable_search: true

0 commit comments

Comments
 (0)