Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #129

Merged
merged 3 commits into from
Sep 8, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
uses: madrapps/jacoco-report@v1.7.0
with:
paths: |
${{ github.workspace }}/**/build/reports/jacoco/prodNormalDebugCoverage/prodNormalDebugCoverage.xml,
Expand All @@ -76,6 +76,17 @@ jobs:
<br>
<img src="/preview/multi-module-screenshot.png" alt="multi-module screenshot" title="multi-module screenshot" width="700" />

### Understanding the Coverage Report

- The "delta" (the negative value next to the coverage) represents the percentage of newly added or modified lines of code that are not covered by unit tests.
It calculates the difference in test coverage based solely on the changes made in the current commit or pull request.
For example, if 10 lines of code are modified or added, and 8 of those lines are covered by unit tests, the "delta"
would be -20%, indicating 20% of the newly changed code is untested. However, the "delta" has limitations. It can never
be positive, meaning if you add more unit tests to cover existing, unmodified code, this additional coverage is
not reflected in the delta. The metric only considers lines directly changed in the current set of modifications,
as there is no mechanism to track improvements in coverage for pre-existing code that hasn't been altered.


### Example Project

For a working project refer to [jacoco-playgound](https://github.com/thsaravana/jacoco-playground). Check out the PR's
Expand Down Expand Up @@ -111,7 +122,7 @@ refer [jacoco-android-playground](https://github.com/thsaravana/jacoco-android-p
```yaml
- name: Jacoco Report to PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
uses: madrapps/jacoco-report@v1.7.0
with:
paths: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -132,7 +143,7 @@ refer [jacoco-android-playground](https://github.com/thsaravana/jacoco-android-p
```yaml
- name: Jacoco Report to PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
uses: madrapps/jacoco-report@v1.7.0
with:
paths: |
${{ github.workspace }}/**/build/reports/jacoco/**/prodNormalDebugCoverage.xml,
Expand All @@ -152,7 +163,7 @@ refer [jacoco-android-playground](https://github.com/thsaravana/jacoco-android-p
```yaml
- name: Jacoco Report to PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
uses: madrapps/jacoco-report@v1.7.0
with:
paths: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -162,6 +173,8 @@ refer [jacoco-android-playground](https://github.com/thsaravana/jacoco-android-p
pass-emoji: ':green_circle:'
fail-emoji: ':red_circle:'
```



## Troubleshooting

Expand Down
Loading