1- name : Measure coverage
1+ name : Coverage report
22
33on :
4- push :
5- branches :
6- - feat/CS-36689-compare-merge-branch
4+ push :
5+ branches :
6+ - feat/CS-36689-compare-merge-branch
77
88jobs :
9- build :
9+ test :
1010 runs-on : ubuntu-latest
11+
1112 steps :
12- - uses : actions/checkout@v2
13- - name : Set up JDK 1.8
14- uses : actions/setup-java@v1
13+ - name : JaCoCo Code Coverage Report
14+ id : jacoco_reporter
15+ uses : PavanMudigonda/jacoco-reporter@v4.8
1516 with :
16- java-version : 1.8
17- - name : Run Coverage
18- run : |
19- mvn test
17+ coverage_results_path : jacoco-report/test.xml
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
25+
26+ # Publish Coverage Job Summary (Optional)
27+ - name : Add Coverage Job Summary
28+ run : echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY
2029
21- - name : Add coverage to PR
22- id : jacoco
23- uses : madrapps/jacoco-report@v1.3
30+ # Uploads the coverage-report.md artifact (Optional)
31+ - name : Upload Code Coverage Artifacts
32+ uses : actions/upload-artifact@v2
2433 with :
25- paths : ${{ github.workspace }}/target/site/jacoco/index.html
26- token : ${{ secrets.GITHUB_TOKEN }}
27- min-coverage-overall : 40
28- min-coverage-changed-files : 60
29- - name : Build with Maven
30- run : mvn -B package -Pcoverage
34+ name : code-coverage-report-markdown
35+ path : " coverage-report.md"
36+ retention-days : 1
0 commit comments