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

[full-ci] add code coverage flag to the debug build and add docs for generating the coverage report #11081

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nirajacharya2
Copy link
Contributor

@nirajacharya2 nirajacharya2 commented Feb 28, 2025

Description

This PR adds build flag to create a code-coverage report and docs for getting the report

output:

~/ocis$ go tool covdata percent -i=somedata

 github.com/owncloud/ocis/v2/ocis-pkg/account            coverage: 100.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/ast                coverage: 23.1% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/broker             coverage: 33.3% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/capabilities               coverage: 100.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/checks             coverage: 60.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/clihelper          coverage: 100.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/config             coverage: 88.5% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/config/configlog           coverage: 55.6% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/config/defaults            coverage: 54.5% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/config/envdecode           coverage: 42.4% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/config/parser              coverage: 86.2% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/conversions                coverage: 44.4% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/cors               coverage: 100.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/crypto             coverage: 58.2% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/generators         coverage: 77.8% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/handlers           coverage: 49.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/keycloak           coverage: 0.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/kql                coverage: 49.5% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/l10n               coverage: 17.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/ldap               coverage: 78.6% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/log                coverage: 65.8% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/middleware         coverage: 50.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/natsjsregistry             coverage: 65.2% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/oidc               coverage: 46.7% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/registry           coverage: 80.2% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/roles              coverage: 83.9% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/service/debug              coverage: 88.1% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/service/grpc               coverage: 62.2% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/service/grpc/handler/ratelimiter           coverage: 21.4% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/service/http               coverage: 86.4% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/shared             coverage: 47.4% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/structs            coverage: 100.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/sync               coverage: 35.7% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/tracing            coverage: 14.8% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/version            coverage: 72.7% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/x/io/fsx           coverage: 90.0% of statements
        github.com/owncloud/ocis/v2/ocis-pkg/x/path/filepathx           coverage: 100.0% of statements

or the webui view

image

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Copy link

update-docs bot commented Feb 28, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant