10
10
name : Build, test and monitor quality on Ubuntu
11
11
12
12
steps :
13
+ - uses : actions/checkout@v4
14
+ if : github.event_name == 'push'
13
15
- uses : actions/checkout@v4
14
16
with :
15
- ref : " refs/pull/${{ github.event.number }}/merge"
17
+ ref : " ${{ github.event.pull_request.merge_commit_sha }}"
18
+ if : github.event_name == 'pull_request_target'
16
19
- name : Set up JDK 21
17
20
uses : actions/setup-java@v4
18
21
with :
@@ -24,10 +27,16 @@ jobs:
24
27
uses : stCarolas/setup-maven@v5
25
28
with :
26
29
maven-version : 3.9.9
30
+ - name : Cache the NVD database
31
+ uses : actions/cache@v4
32
+ with :
33
+ path : ~/.m2/repository/org/owasp/dependency-check-data
34
+ key : dependency-check
27
35
- name : Build with Maven
28
36
env :
29
37
BROWSER : chrome-container
30
- run : mvn -V --color always -ntp clean verify -Ppit -Pci | tee maven.log
38
+ NVD_API_KEY : ${{ secrets.NVD_API_KEY }}
39
+ run : mvn -V --color always -ntp clean verify -Ppit -Pci -Powasp | tee maven.log
31
40
- name : Extract pull request number
32
41
uses : jwalton/gh-find-current-pr@v1
33
42
id : pr
72
81
"id": "spotbugs",
73
82
"sourcePath": "src/main/java",
74
83
"pattern": "**/target/spotbugsXml.xml"
84
+ },
85
+ {
86
+ "id": "error-prone",
87
+ "pattern": "**/maven.log"
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "name": "Vulnerabilities",
93
+ "id": "vulnerabilities",
94
+ "icon": "shield",
95
+ "tools": [
96
+ {
97
+ "id": "owasp-dependency-check",
98
+ "pattern": "**/target/dependency-check-report.json"
75
99
}
76
100
]
77
101
}
@@ -95,6 +119,25 @@ jobs:
95
119
"pattern": "**/target/site/jacoco/jacoco.xml"
96
120
}
97
121
]
122
+ },
123
+ {
124
+ "name": "Mutation Coverage",
125
+ "tools": [
126
+ {
127
+ "id": "pit",
128
+ "name": "Mutation Coverage",
129
+ "metric": "mutation",
130
+ "sourcePath": "src/main/java",
131
+ "pattern": "**/target/pit-reports/mutations.xml"
132
+ },
133
+ {
134
+ "id": "pit",
135
+ "name": "Test Strength",
136
+ "metric": "test-strength",
137
+ "sourcePath": "src/main/java",
138
+ "pattern": "**/target/pit-reports/mutations.xml"
139
+ }
140
+ ]
98
141
}
99
142
],
100
143
"metrics":
0 commit comments