Skip to content

PSA: warning about report.fail-under setting #631

@gegoune

Description

@gegoune

Hi there sir,

I might have figured out what is causing #303 for OP.

it was https://coverage.readthedocs.io/en/latest/config.html#report-fail-under setting which I had set to 100. coverage json -o - will exit with error code 2 in case reported value is below set value. Error in GHA is not really pointing toward solution and it took me a good while to figure it out. Therefore I would suggest mentioning it in documentation, or see if action can perhaps override this for its own executions.

While I am here, on unrelated issue - I have also been running coverage pointed to specific configuration file (--rcfile <path>). I did that for both coverage run and coverage report and was always seeing proper results. But action was not using this option and failing to read configuration file (which was required for proper reporting) and was reporting coverage of either 0% or 100% per file. By the look of things there is no other way to solve this than move configuration file to where tests are ran from (which is what I have done now). Would you consider adding an option for rcfile? (Also, mention in documentation would suffice too.)

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions