1010 name : Build, test and monitor quality on Ubuntu
1111
1212 steps :
13+ - uses : actions/checkout@v4
14+ if : github.event_name == 'push'
1315 - uses : actions/checkout@v4
1416 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'
1619 - name : Set up JDK 21
1720 uses : actions/setup-java@v4
1821 with :
@@ -24,10 +27,16 @@ jobs:
2427 uses : stCarolas/setup-maven@v5
2528 with :
2629 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
2735 - name : Build with Maven
2836 env :
2937 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
3140 - name : Extract pull request number
3241 uses : jwalton/gh-find-current-pr@v1
3342 id : pr
7281 "id": "spotbugs",
7382 "sourcePath": "src/main/java",
7483 "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"
7599 }
76100 ]
77101 }
@@ -95,6 +119,25 @@ jobs:
95119 "pattern": "**/target/site/jacoco/jacoco.xml"
96120 }
97121 ]
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+ ]
98141 }
99142 ],
100143 "metrics":
0 commit comments