generated from pagopa/pagopa-functions-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
ops: code review workflow and test coverage #37
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
added onboarding-sdk-pom to avoid orphan error with sonar plugin
SonarCloud Quality Gate failed. 0 Bugs 0.0% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
gianmarcoplutino
approved these changes
Nov 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
List of Changes
This pull request introduces improvements to our test coverage reporting and integration with SonarQube for our project. The changes primarily revolve around the 'test-coverage' submodule, which plays a crucial role in assessing the unit test coverage of our entire project.
Here's a breakdown of the key enhancements included in this pull request:
'test-coverage' Submodule: We've enhanced the 'test-coverage' submodule to facilitate comprehensive unit test coverage verification for individual project modules. This submodule contains a range of configurations to support the assessment of test coverage for each module.
Integration with Maven Jacoco Plugin: We've integrated the powerful Maven Jacoco plugin, utilizing the 'report-aggregate' goal to aggregate the test coverage reports generated by individual modules. These aggregated reports are then sent to SonarQube for a holistic evaluation of test coverage and code quality.
Module-specific Jacoco Configuration: To ensure accurate test coverage reporting for each module, we've made it a requirement for every module to include the same plugin or library that generates the 'jacoco.xml' file summarizing the test coverage for that specific module.
Custom Profiles: We've configured custom profiles to simplify the process of running test coverage checks on individual modules. For example, to assess the 'onboarding-ms' module, you can execute the following script: 'mvn --projects :test-coverage --also-make verify -Ponboarding-ms,report,coverage'. The 'report' profile is dedicated to report generation, while the 'coverage' profile is designed for running the SonarQube scan in the cloud environment.
Motivation and Context
These improvements will not only enhance our ability to monitor and improve test coverage but also streamline the integration of test coverage data into our SonarQube analysis, thereby promoting better code quality and reliability.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: