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

ci: Add code coverage #572

Merged
merged 1 commit into from
Jul 29, 2020
Merged

ci: Add code coverage #572

merged 1 commit into from
Jul 29, 2020

Conversation

simar7
Copy link
Member

@simar7 simar7 commented Jul 27, 2020

This adds code coverage to each PR we create.

Addresses: #563

Signed-off-by: Simarpreet Singh simar@linux.com

@simar7 simar7 requested a review from knqyf263 July 27, 2020 23:17
@simar7 simar7 self-assigned this Jul 27, 2020
@codecov
Copy link

codecov bot commented Jul 27, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #572   +/-   ##
=========================================
  Coverage          ?   55.68%           
=========================================
  Files             ?       44           
  Lines             ?     2085           
  Branches          ?        0           
=========================================
  Hits              ?     1161           
  Misses            ?      803           
  Partials          ?      121           

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 4d721e1...b70c86e. Read the comment docs.

@knqyf263
Copy link
Collaborator

knqyf263 commented Jul 28, 2020

Thanks! Does Codecov affect the test result? For example, it fails the test if the coverage is reduced. It's OK If it's not the case. In my experience, the coverage is useful, but it doesn't need to affect the test result.

@simar7 simar7 requested a review from lizrice July 28, 2020 17:29
@simar7 simar7 force-pushed the add-codecov branch 2 times, most recently from 043b19e to fc3a8c6 Compare July 28, 2020 22:15
Signed-off-by: Simarpreet Singh <simar@linux.com>
@simar7
Copy link
Member Author

simar7 commented Jul 28, 2020

Thanks! Does Codecov affect the test result? For example, it fails the test if the coverage is reduced. It's OK If it's not the case. In my experience, the coverage is useful, but it doesn't need to affect the test result.

We can run it in informational mode where the PR is not gated (failed) if the coverage is lower than what it was before. See more https://docs.codecov.io/docs/commit-status#branches

I've changed it to behave like that now. Thoughts?

Copy link
Collaborator

@knqyf263 knqyf263 left a comment

Choose a reason for hiding this comment

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

It looks great to me 👍

Copy link
Contributor

@lizrice lizrice left a comment

Choose a reason for hiding this comment

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

lgtm

@lizrice
Copy link
Contributor

lizrice commented Jul 29, 2020

Would it make sense to run codecov over other Trivy repos e.g. fanal?

@knqyf263
Copy link
Collaborator

Yes, we should add codecov in fanal and trivy-db as well.

@simar7 simar7 merged commit 8eb9df8 into master Jul 29, 2020
@simar7 simar7 deleted the add-codecov branch July 29, 2020 22:09
liamg pushed a commit that referenced this pull request Jun 7, 2022
Signed-off-by: Simarpreet Singh <simar@linux.com>
josedonizetti pushed a commit to josedonizetti/trivy that referenced this pull request Jun 24, 2022
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.

3 participants