Comments (11)
@PavanMudigondaTR I can confirm that it is now working properly (v4.3).
With:
skip_check_run: true
publish_only_summary: false
the coverage-results.md
file is generated properly and I can archive it, with something like the following:
- name: Upload Code Coverage Artifacts
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: "*/coverage-results.md"
retention-days: 1
from jacoco-reporter.
@gmetal Github REST API has a limit of 65K chars for creating checkrun. Its limitation on Microsoft/Github side. I will take this request as enhancement and i will look in to using GitHub GraphQL API instead but i can't promise any timeline since i happened to be busy at moment.
from jacoco-reporter.
@gmetal
I have fully fixed it in v4.3 and well tested in https://github.com/PavanMudigonda/jacoco-playground/actions
you are welcome to try out as per my https://github.com/PavanMudigonda/jacoco-reporter/blob/main/README.md
from jacoco-reporter.
@gmetal I tried to solve it by using GitHub Graph API but i got the same error....GitHub has hard limit on how many characters that can be posted as CheckRun. I will find a way to slim down report or only publish summary.
from jacoco-reporter.
@PavanMudigonda I think that publishing a summary would a safer approach. It would also cover most scenarios I believe.
from jacoco-reporter.
@gmetal Please try again with your report that is about 1.3Mb). Use below parameters.
uses: PavanMudigonda/[email protected],
publish_only_summary: true
- name: JaCoCo Code Coverage Report
id: jacoco_reporter
uses: PavanMudigonda/[email protected]
with:
coverage_results_path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_check_run: false
minimum_coverage: 80
fail_below_threshold: false
publish_only_summary: true
from jacoco-reporter.
You should see 12.48 %
Covered Lines: 1125
Missed Lines: 7888
Total Lines: 9013
Coverage % : 12.48 %
from jacoco-reporter.
I have made another workaround for this 65k problem. Please see below with this i do skip check run and then generate markdown file and upload to GitHub assets which you can download and view offline using VS Code. I hope this helps you and your team !
https://github.com/PavanMudigonda/jacoco-playground/actions/runs/2173239744
jobs:
test:
runs-on: ubuntu-latest
steps:
# generates coverage-report.md and publishes as checkrun
- name: JaCoCo Code Coverage Report
id: jacoco_reporter
uses: PavanMudigonda/[email protected]
with:
coverage_results_path: jacoco-report/test.xml
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_check_run: true
minimum_coverage: 80
fail_below_threshold: false
publish_only_summary: false
# uploads the coverage-report.md artifact
- name: Upload Code Coverage Artifacts
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: */coverage-results.md
retention-days: 1
from jacoco-reporter.
@PavanMudigonda I tried the 2.6 version (the summary version) and it worked fine. I also gave 2.7 a go as per your instructions, but I got the original error.
from jacoco-reporter.
@PavanMudigonda I tried the 2.6 version (the summary version) and it worked fine. I also gave 2.7 a go as per your instructions, but I got the original error.
@gmetal
Could you try v3.0 as i have fixed few other problems.
Scenario# 1:- Generate summary report as checkrun
generates coverage-report.md and publishes as checkrun
- name: JaCoCo Code Coverage Report
id: jacoco_reporter
uses: PavanMudigonda/[email protected]
with:
coverage_results_path: jacoco-report/test.xml
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_check_run: false # set to false to publish check run
minimum_coverage: 80
fail_below_threshold: false # set to false to pass below even when threshold is not met
publish_only_summary: true. #set to true to publish only summary to avoid 65k problem
Scenario# 2 Generate full report and view offline by downloading coverage artifact
generates coverage-report.md and publishes as checkrun
- name: JaCoCo Code Coverage Report
id: jacoco_reporter
uses: PavanMudigonda/[email protected]
with:
coverage_results_path: jacoco-report/test.xml
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_check_run: true # set to true to skip the run and to avoid 65k problem
minimum_coverage: 80
fail_below_threshold: false
publish_only_summary: false #set to false to generate full coverage report
uploads the coverage-report.md artifact for offline viewing using VS Code
- name: Upload Code Coverage Artifacts
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: */coverage-results.md
retention-days: 1
from jacoco-reporter.
@PavanMudigonda Hello, I had a go at version 3 of the action. When using the skip_check_run: true
, then no artifacts get generated. If that is set to false, then the coverage-results.md
is not generated. With skip_check_run:false
and the publish_only_summary: false
the I run into the 65k problem again.
from jacoco-reporter.
Related Issues (20)
- GH Action failing when Covered Lines is 0 HOT 1
- Should consider checking when $coveredLines is 0 HOT 2
- bug in output variable coverage_percentage HOT 1
- Execution hangs without any visible error HOT 14
- Cannot bind coveragePercentageString argument to parameter 'Value' in actions.ps1:244 HOT 3
- Action Fails With "Resource not accessible by integration" HOT 6
- Display Coverage Percent along with Check HOT 8
- Invalid format '# Coverage Report: Test coverage results' HOT 4
- Some errors appearing on action execution (not happening before) HOT 4
- Deprecation warning from github HOT 2
- Code coverage differs from JaCoCo report HOT 3
- Support for multi-module projects with multiple coverage reports
- Action doesn't work if `coverage_report_title` is not set HOT 1
- Unable to locate executable file: pwsh on Self-hosted GitHub Runner HOT 1
- Can't get coverageSummary from outputs HOT 2
- Regression: build failure when upgrading from v4.9 to v5.0 HOT 4
- Upgrade to Node 20
- Previous Bump of Node 16 to 20 not working HOT 6
- Different coverage values between jacoco file and jacoco-reporter HOT 3
- embedmissedlines.ps1 parameter 'Path' is null HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jacoco-reporter.