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

Why can't I use 'totals_covered_display' as the coverage figure? #32

Closed
ThGaskin opened this issue Dec 12, 2023 · 4 comments
Closed

Why can't I use 'totals_covered_display' as the coverage figure? #32

ThGaskin opened this issue Dec 12, 2023 · 4 comments

Comments

@ThGaskin
Copy link

In my coverage-summary.json, my percent_covered figure comes to e.g. 80.82490239, and the percent_covered_display is then the rounded number (80). However, if I do

- name: Create coverage badge
  uses: jaywcjlove/coverage-badges-cli@main
  with:
    style: classic
    source: ./coverage/coverage-summary.json
    output: ./coverage/coverage-badge.svg
    jsonPath: totals.percent_covered_display

my CI fails with the error

totals.percent_covered_display evaluates to "80" and is not a suitable path in the JSON coverage data

Why would this be? The long float figure is awkward to use, since it creates a very long and ugly bar :(

jaywcjlove added a commit that referenced this issue Dec 12, 2023
github-actions bot pushed a commit that referenced this issue Dec 12, 2023
jaywcjlove added a commit that referenced this issue Dec 12, 2023
github-actions bot pushed a commit that referenced this issue Dec 12, 2023
@jaywcjlove
Copy link
Owner

@ThGaskin Upgrade v1.2.4

@ThGaskin
Copy link
Author

My CI is still failing because GitHub Actions isn't using the latest version -- maybe I should wait a few hours? Thank you anyway for the quick fix!

jaywcjlove added a commit that referenced this issue Dec 13, 2023
jaywcjlove added a commit that referenced this issue Dec 13, 2023
github-actions bot pushed a commit that referenced this issue Dec 13, 2023
@jaywcjlove
Copy link
Owner

@ThGaskin The problem should be solved. CI You can try re-running it.

Upgrade v1.2.5

@ThGaskin
Copy link
Author

Thank you!

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