Skip to content

Commit bb9cd69

Browse files
coverage
1 parent ecd05c5 commit bb9cd69

File tree

2 files changed

+27
-22
lines changed

2 files changed

+27
-22
lines changed

.github/workflows/coverage.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
1-
name: Measure coverage
1+
name: Coverage report
22

33
on:
4-
push:
5-
branches:
6-
- feat/CS-36689-compare-merge-branch
4+
push:
5+
branches:
6+
- feat/CS-36689-compare-merge-branch
77

88
jobs:
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

src/main/java/com/contentstack/cms/stack/Webhook.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ public Call<ResponseBody> export() {
300300
* @since 0.1.0
301301
*/
302302
public Call<ResponseBody> importWebhook(@NotNull String fileName, @NotNull String jsonPath) {
303-
// TODO: check before pushing
304303
MediaType mediaType = MediaType.parse("application/json; charset=utf-8");
305304
MultipartBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
306305
.addFormDataPart("webhook", fileName, RequestBody.create(mediaType, new File(jsonPath))).build();

0 commit comments

Comments
 (0)