-
Notifications
You must be signed in to change notification settings - Fork 597
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
Update test.yml Github Action to report coverage to sonarcloud #8712
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Update SonarCloud
projectBaseDir
to the repository root.The
app
directory does not contain ago.mod
file and includes multiple Go source files across various subdirectories. This suggests thatapp
is not a standalone Go module but part of a larger monorepo structure.Action Required:
projectBaseDir
fromapp
to.
in the SonarCloud configuration to ensure that the entire repository is analyzed correctly.This adjustment will help SonarCloud accurately assess the project's structure and dependencies.
Analysis chain
Good addition of SonarCloud integration, but check the projectBaseDir setting.
The new
sonarCloudTrigger
job is well-structured and comprehensive. It correctly depends on thego
job, ensuring that code coverage results are available. The SonarCloud configuration covers essential aspects like coverage paths, test paths, and exclusions.However, there's a potential issue:
The
projectBaseDir
is set toapp
(line 189), but it's not clear if this is the correct base directory for your project. This setting determines the root directory for SonarCloud analysis. If your project structure doesn't have anapp
directory at the root, this could lead to incorrect analysis results.Please verify if
app
is the correct base directory. If not, you should adjust this setting to match your project structure, typically using.
for the root of the repository.To confirm the correct project structure, you can run:
This will display the directory structure, helping you determine the correct
projectBaseDir
setting.Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 8680
Script:
Length of output: 3406