Skip to content

upload coverage to codecov.io#84

Merged
SteveLasker merged 3 commits intoveraison:mainfrom
qmuntal:codecov
Jul 11, 2022
Merged

upload coverage to codecov.io#84
SteveLasker merged 3 commits intoveraison:mainfrom
qmuntal:codecov

Conversation

@qmuntal
Copy link
Copy Markdown
Member

@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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member 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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done! 6bb266d

qmuntal added 2 commits July 6, 2022 10:14
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Copy link
Copy Markdown
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