Build fail
Closed this issue · 2 comments
ashahabov commented
Is it possible for this action to fail the build when Line Coverage is below X?
danielpalme commented
That's currently not possible.
But I think it is a good idea.
Please give me some time, I will try to add this as soon as possible.
danielpalme commented
Sorry that it took so long, but you can now use additional settings to fail the build if coverage drops below a given threshold:
https://github.com/danielpalme/ReportGenerator/wiki/Settings#minimum-coverage-thresholds
Here is a full sample (requiring a line coverage quota of at least 80%):
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.23
with:
reports: 'coverage.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
targetdir: 'coveragereport' # REQUIRED # The directory where the generated report should be saved.
customSettings: 'minimumCoverageThresholds:lineCoverage=80'