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

upload coverage to codecov.io #84

Merged
merged 3 commits into from Jul 11, 2022
Merged

upload coverage to codecov.io #84

merged 3 commits into from Jul 11, 2022

Conversation

qmuntal
Copy link
Contributor

@qmuntal qmuntal commented Jul 4, 2022

Fix #50

Signed-off-by: qmuntal qmuntaldiaz@microsoft.com

Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@b870a00). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head be116c6 differs from pull request most recent head 6bb266d. Consider uploading reports for the commit 6bb266d to get more accurate results

@@           Coverage Diff           @@
##             main      #84   +/-   ##
=======================================
  Coverage        ?   89.74%           
=======================================
  Files           ?       10           
  Lines           ?      985           
  Branches        ?        0           
=======================================
  Hits            ?      884           
  Misses          ?       67           
  Partials        ?       34           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b870a00...6bb266d. Read the comment docs.

@qmuntal qmuntal mentioned this pull request Jul 4, 2022
Copy link
Contributor

@thomas-fossati thomas-fossati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

Copy link
Contributor

@SteveLasker SteveLasker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @qmuntal,
LGTM

- name: Go Coverage
run: |
go version
go test -short -cover | grep "^.*coverage:.*of statements$" | python -c "import os,re,sys; cover_rpt = sys.stdin.read(); print(cover_rpt) if len(cover_rpt) != 0 and len(cover_rpt.splitlines()) == 1 else sys.exit(1); min_cover = float(re.findall(r'\d*\.\d+|\d+', os.environ['GITHUB_WORKFLOW'])[0]); cover = float(re.findall(r'\d*\.\d+|\d+', cover_rpt)[0]); sys.exit(1) if (cover > 100) or (cover < min_cover) else sys.exit(0)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we retain the cover >= 89% check to ensure we always have coverage >= 89%? It seems codecov does not provide this functionality.

Copy link
Contributor Author

@qmuntal qmuntal Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, forgot to do that. Codecov does support minimum coverage checks: https://docs.codecov.com/docs/commit-status. I'm trying to set it up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! 6bb266d

Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

Integrate with codecov.io
4 participants