File tree Expand file tree Collapse file tree 2 files changed +18
-53
lines changed
Expand file tree Collapse file tree 2 files changed +18
-53
lines changed Original file line number Diff line number Diff line change 1- name : Coverage report
1+ name : Java CI with Code Coverage
22
33on :
44 push :
55 branches :
6- - feat/CS-36689-compare-merge-branch
6+ - main
77
88jobs :
9- test :
9+ build-and- test :
1010 runs-on : ubuntu-latest
1111
1212 steps :
13- - name : JaCoCo Code Coverage Report
14- id : jacoco_reporter
15- uses : actions/setup-java@v3
13+ - name : Checkout code
14+ uses : actions/checkout@v2
15+ - name : Set up JDK 11
16+ uses : actions/setup-java@v2
1617 with :
17- coverage_results_path : site/jacoco/jococo.html
18- coverage_report_name : Coverage
19- coverage_report_title : JaCoCo
20- github_token : ${{ secrets.GITHUB_TOKEN }}
21- skip_check_run : false
22- minimum_coverage : 80
23- fail_below_threshold : false
24- publish_only_summary : false
18+ java-version : 11
2519
26- # Publish Coverage Job Summary (Optional)
27- - name : Add Coverage Job Summary
28- run : echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY
20+ - name : Build with Maven
21+ run : mvn clean package
2922
30- # Uploads the coverage-report.md artifact (Optional)
31- - name : Upload Code Coverage Artifacts
23+ - name : Run Tests with JaCoCo
24+ run : mvn jacoco:prepare-agent jacoco:report
25+
26+ - name : Upload Code Coverage Report
3227 uses : actions/upload-artifact@v2
3328 with :
34- name : code-coverage-report-markdown
35- path : " coverage-report.md"
36- retention-days : 1
29+ name : code-coverage-report
30+ path : target/site/jacoco
Original file line number Diff line number Diff line change 175175 </dependencies >
176176
177177
178- <!-- <profiles>
179- <profile>
180- <id>ossrhDeploy</id>
181- <distributionManagement>
182- <repository>
183- <id>ossrh</id>
184- <name>Central Repository OSSRH</name>
185- <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
186- </repository>
187- <snapshotRepository>
188- <id>ossrh</id>
189- <name>Central Repository OSSRH</name>
190- <url>https://oss.sonatype.org/content/repositories/snapshots</url>
191- </snapshotRepository>
192- </distributionManagement>
193- </profile>
194- <profile>
195- <id>githubDeploy</id>
196- <distributionManagement>
197- <repository>
198- <id>github</id>
199- <name>GitHub Apache Maven Packages</name>
200- <url>https://maven.pkg.github.com/contentstack/contentstack-management-java</url>
201- </repository>
202- </distributionManagement>
203- </profile>
204- </profiles> -->
205-
206-
207178 <build >
208179 <plugins >
209180 <!-- mvn
334305 <version >${jococo-plugin.version} </version >
335306 <executions >
336307 <execution >
308+ <id >prepare-agent</id >
337309 <goals >
338310 <goal >prepare-agent</goal >
339311 </goals >
340312 </execution >
341313 <execution >
342- <id >generate-code-coverage-report</id >
343- <phase >test</phase >
314+ <id >report</id >
344315 <goals >
345316 <goal >report</goal >
346317 </goals >
You can’t perform that action at this time.
0 commit comments