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

[Feature request] Add new parameter "minimum_coverage_per_file" #81

Open
tprouvot opened this issue Mar 28, 2023 · 1 comment
Open

[Feature request] Add new parameter "minimum_coverage_per_file" #81

tprouvot opened this issue Mar 28, 2023 · 1 comment

Comments

@tprouvot
Copy link

Hi,
Thanks for this action, it is very helpful !

It would be nice to have two distinct a new parameter which would be : minimum_coverage_per_file

Example:

- name: cobertura-report
        uses: 5monkeys/cobertura-action@v13
        with:
          path: cobertura/coverage/cobertura.xml
          minimum_coverage: 75
          minimum_coverage_per_file: 70

And result would be

first example KO

File Coverage Lines Missing
All files 75% 75%
no-map/AccountTriggerHandler 100% 100%
no-map/AccountContactRelation 50% 50%

Minimum coverage requirement was not satisfied (75% global and 70% per file )

- name: cobertura-report
        uses: 5monkeys/cobertura-action@v13
        with:
          path: cobertura/coverage/cobertura.xml
          minimum_coverage: 85
          minimum_coverage_per_file: 75

second example OK

File Coverage Lines Missing
All files 87% 87%
no-map/AccountTriggerHandler 100% 100%
no-map/AccountContactRelation 75% 75%

Minimum coverage requirement satisfied (85% global and 75% per file )

@Rasmus-Fink
Copy link

In our project we currently can't fail a build when a single files is below the threshold.
The suggested option would come in very handy here!

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

No branches or pull requests

2 participants