Open 9b9 opened 9 months ago
For me version from PR as of https://github.com/PavanMudigonda/jacoco-reporter/pull/58/commits/68322527ed7e4c03b9dd6ed43431099e498de593 is failing with:
Error: Unable to process file command 'output' successfully.
Error: Invalid format '# Coverage Report: Coverage'
for:
Run PavanMudigonda/jacoco-reporter@56-cant-get-coveragesummary-from-outputs
with:
coverage_results_path: /home/runner/work/project/project/jacoco.xml
coverage_report_name: JaCoCo
coverage_report_title: Coverage
github_token: ***
skip_check_run: false
minimum_coverage: 80
fail_below_threshold: false
publish_only_summary: false
Other outputs are available in main
branch though, so I posted summary as:
- name: Grenerate Jacoco report
id: jacoco_reporter
uses: PavanMudigonda/jacoco-reporter@v5.0
with:
coverage_results_path: ${{ github.workspace }}/jacoco.xml
coverage_report_name: Jacoco
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_check_run: false
minimum_coverage: 80
fail_below_threshold: false
publish_only_summary: false
- name: Add Jacocoo report to workflow run summary
run: |
echo "| Outcome | Value |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
echo "| Code Coverage % | ${{ steps.jacoco_reporter.outputs.coverage_percentage }} |" >> $GITHUB_STEP_SUMMARY
echo "| :heavy_check_mark: Number of Lines Covered | ${{ steps.jacoco_reporter.outputs.covered_lines }} |" >> $GITHUB_STEP_SUMMARY
echo "| :x: Number of Lines Missed | ${{ steps.jacoco_reporter.outputs.missed_lines }} |" >> $GITHUB_STEP_SUMMARY
echo "| Total Number of Lines | ${{ steps.jacoco_reporter.outputs.total_lines }} |" >> $GITHUB_STEP_SUMMARY
Here is the result look of the summary:
where Maven test
is the name of the job.
@atokartricentis I have updated the above solution in README.md for now. I will fix the variable in coming days. Thank you !
Describe the bug When I echo the outputs.coverageSummary, nothing is printed. I noticed that the variable is marked. Does it still work?
To Reproduce Steps to reproduce the behavior:
Expected behavior Get the core coverage summary from outputs variable.
By the way, there is one less white space in the sample code:
And the GitHub will throw an error about yaml syntax:
Invalid workflow file: .github/workflows/java-pipeline.yml#L18 You have an error in your yaml syntax on line 18