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

Add option to fail action if test coverage % declines by certain amount #375

Open
joyt opened this issue Jun 2, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@joyt
Copy link

joyt commented Jun 2, 2023

Idea

Would like a way for this action to fail IF the test coverage % declines by a minimum percent

Description

Add option to fail action if test coverage % declines

Alternatives

Potentially easier / more general solution:
If there's a way to get a machine-parseable summary of test coverage (e.g. JSON), including the % changes, as an output variable, then a subsequent workflow step and can read/parse that output and do arbitrary logic to fail/pass the workflow.

^ Why not parse the output: 'report_markdown' output? Currently the 'report_markdown' option conflicts with the 'comment' option, which doesn't work for my use case because I want to have the comment added, and ALSO get the test coverage diff %. Also the markdown output is not a good format for further programmatic logic, so an output in JSON or something similar would be preferred.

@joyt joyt added the enhancement New feature or request label Jun 2, 2023
@collagenial
Copy link

This enhancement would be very welcome.

@JamesBrightman-pp
Copy link

Can this be re-opened? This is an extremely valuable addition and a much better way to test coverage changed in a larger existing app than static thresholds (imo).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants