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

Adding packages other than controllers to the code coverage report from the integration tests #425

Merged
merged 4 commits into from
Feb 16, 2024

Conversation

eguzki
Copy link
Contributor

@eguzki eguzki commented Feb 16, 2024

What

Adding packages other than controllers to the code coverage report from the integration tests has increased ~14% the full code coverage 🎉

Makes sense. Integration tests also run code other than in the controllers package that was not covered with the unit tests

Additionally:

  • Integration tests report code coverage for all golang packages (not just ./controllers/...)
  • Upgraded GH Action codecov/codecov-action@v4
  • Integration test setting to use existing cluster defined at the suite test
  • Use the Ginkgo CLI as it is the recommended and supported tool for running Ginkgo suites
  • Since this repo has not been using controller-runtime’s envtest environment to run e2e tests, remove unused kubebuilder assets.

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Merging #425 (f3553fa) into main (c831a70) will increase coverage by 13.88%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #425       +/-   ##
===========================================
+ Coverage   66.49%   80.38%   +13.88%     
===========================================
  Files          38       40        +2     
  Lines        3901     3140      -761     
===========================================
- Hits         2594     2524       -70     
+ Misses       1123      414      -709     
- Partials      184      202       +18     
Flag Coverage Δ
integration 68.66% <ø> (-3.18%) ⬇️
unit 35.50% <ø> (-25.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
api/v1beta1 (u) 71.42% <ø> (∅)
api/v1beta2 (u) 90.90% <ø> (+34.30%) ⬆️
pkg/common (u) 89.23% <ø> (+10.64%) ⬆️
pkg/istio (u) 73.91% <ø> (+36.79%) ⬆️
pkg/log (u) 94.73% <ø> (+62.91%) ⬆️
pkg/reconcilers (u) 80.16% <ø> (+46.71%) ⬆️
pkg/rlptools (u) 79.45% <ø> (+22.99%) ⬆️
controllers (i) 76.20% <ø> (+4.36%) ⬆️

see 39 files with indirect coverage changes

Cleanup controller-runtime’s envtest environment to run e2e tests as it is not being used
@eguzki eguzki marked this pull request as ready for review February 16, 2024 11:32
@eguzki eguzki requested a review from a team as a code owner February 16, 2024 11:32
@eguzki eguzki changed the title code coverage data for all packages for integration tests Adding packages other than controllers to the code coverage report from the integration tests Feb 16, 2024
@eguzki eguzki changed the title Adding packages other than controllers to the code coverage report from the integration tests Adding packages other than controllers to the code coverage report from the integration tests Feb 16, 2024
Copy link
Contributor

@KevFan KevFan left a comment

Choose a reason for hiding this comment

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

Nice ! Looks good to me 👍

-tags integration \
--fail-fast \
-v \
$(INTEGRATION_TEST_SUITE_PATHS)
Copy link
Member

@mikenairn mikenairn Feb 16, 2024

Choose a reason for hiding this comment

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

+1 to using ginkgo cli

@eguzki eguzki merged commit c0fa2a2 into main Feb 16, 2024
21 checks passed
@eguzki eguzki deleted the improve-coverage branch February 16, 2024 13:31
adam-cattermole added a commit that referenced this pull request Jun 11, 2024
Add back fail-fast removed in #425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants