Skip to content

Commit f1e2c01

Browse files
committed
add coverage report
1 parent d9b8cef commit f1e2c01

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
branches:
2020
- main
2121
paths:
22+
- '.github/**'
2223
- 'sdk/**'
2324
- 'sdk-testing/**'
2425
- 'sdk-integration-tests/**'
@@ -35,7 +36,7 @@ on:
3536
- 'pom.xml'
3637

3738
permissions:
38-
contents: read
39+
contents: write
3940

4041
jobs:
4142
build:
@@ -59,3 +60,19 @@ jobs:
5960

6061
- name: Build and test
6162
run: mvn -B install --file pom.xml
63+
64+
- name: Generate JaCoCo Badge
65+
if: ${{ matrix.java == 17 }}
66+
# if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }}
67+
uses: cicirello/jacoco-badge-generator@v2
68+
with:
69+
jacoco-csv-file: sdk/target/site/jacoco/jacoco.csv
70+
badges-directory: sdk/target/site/jacoco
71+
72+
- name: Publish coverage report to GitHub Pages
73+
if: ${{ matrix.java == 17 }}
74+
# if: ${{ github.ref == 'refs/heads/coverage' && matrix.java == 17 }}
75+
uses: JamesIves/github-pages-deploy-action@v4
76+
with:
77+
branch: docs/coverage
78+
folder: sdk/target/site/jacoco

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
44
[![Java](https://img.shields.io/badge/java-%3E%3D17-brightgreen)](https://openjdk.org/)
55
[![Build](https://github.com/aws/aws-durable-execution-sdk-java/actions/workflows/build.yml/badge.svg)](https://github.com/aws/aws-durable-execution-sdk-java/actions/workflows/build.yml)
6+
[![Coverage](https://raw.githubusercontent.com/aws/aws-durable-execution-sdk-java/refs/heads/docs/coverage/jacoco.svg)](https://aws.github.io/aws-durable-execution-sdk-java/)
67
[![E2E Tests](https://github.com/aws/aws-durable-execution-sdk-java/actions/workflows/e2e-tests.yml/badge.svg)](https://github.com/aws/aws-durable-execution-sdk-java/actions/workflows/e2e-tests.yml)
78
[![CodeQL](https://github.com/aws/aws-durable-execution-sdk-java/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/aws/aws-durable-execution-sdk-java/actions/workflows/github-code-scanning/codeql)
89
[![Spotless](https://github.com/aws/aws-durable-execution-sdk-java/actions/workflows/check-spotless.yml/badge.svg)](https://github.com/aws/aws-durable-execution-sdk-java/actions/workflows/check-spotless.yml)

0 commit comments

Comments
 (0)