Skip to content

Commit

Permalink
Update README.md (#129)
Browse files Browse the repository at this point in the history
* Update latest version

* Update details about delta value

* Fix lint issue
  • Loading branch information
thsaravana authored Sep 8, 2024
1 parent b5991a2 commit fc9330c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 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,16 @@ 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 +121,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 +142,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 +162,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 Down

0 comments on commit fc9330c

Please sign in to comment.