-
Notifications
You must be signed in to change notification settings - Fork 69
chore: add sonarcloud reporting for aggregate test coverage in gax, api-common and showcase #1482
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
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
d7c919a
chore: add aggregate test coverage collection for showcase and gax
mpeddada1 135022c
add profile to collect test coverage
mpeddada1 d2be02f
add fmt-maven-plugin
mpeddada1 22cda89
add maven compiler version property
mpeddada1 cd0de15
skip fmt
mpeddada1 cddb9f2
add version to fmt plugin
mpeddada1 c116da1
add jar plugin to showcase
mpeddada1 208cfff
add jar plugin to gapic-showcase
mpeddada1 02ef0cb
empty commit to rerun builds
mpeddada1 7f720b8
empty commit
mpeddada1 68557fe
fix syntax in dep declaration
mpeddada1 57ddf93
remove spaces
mpeddada1 fcc5257
add README for coverage-report module
mpeddada1 45a0987
replace monorepo with repsitory in README
mpeddada1 47cf349
add profile to specify modules
mpeddada1 e61d6ea
chore: add sonarcloud reporting for showcase test coverage
mpeddada1 83f085d
Merge branch 'main' into sonar-coverage
mpeddada1 d4ba320
fix yaml syntax
mpeddada1 b856e7f
Merge branch 'sonar-coverage' of github.com:googleapis/gapic-generato…
mpeddada1 f574ec8
fix spacing
mpeddada1 61bb283
comment out previous step
mpeddada1 6c54fbe
avoid calling clean in mvn command
mpeddada1 644edc8
modify syntax:
mpeddada1 afcf7b1
omit yaml formatting
mpeddada1 cff1fa4
install and run showcase server
mpeddada1 b9db44f
set SHOWCASE VERSION env variable
mpeddada1 75a51ec
use forked repo for verification
mpeddada1 6972c9f
undo change
mpeddada1 7aab6ca
uncomment previous build step and temporarily address syntax error
mpeddada1 34869ff
omit mvn clean
mpeddada1 0d342c8
add mvn clean install
mpeddada1 5aa2013
call mvn install
mpeddada1 36d1633
remove mvn clean install
mpeddada1 6f7ead4
comment out unit test job
mpeddada1 63cec27
update SNAPSHOT versions
mpeddada1 efc6ecc
add clean
mpeddada1 9d676c0
add unit test step
mpeddada1 03fd1b9
fix syntax
mpeddada1 74fbf20
fix syntax
mpeddada1 7e4202a
rebase with main
mpeddada1 6264511
clean up pom.xml
mpeddada1 5a662a1
add api-common coverage
mpeddada1 1ab860b
fix pom syntax
mpeddada1 bcd8299
update screenshots in README
mpeddada1 27afb2e
fix renovate version comments
mpeddada1 4b60a61
Merge branch 'sonar-coverage' of github.com:googleapis/gapic-generato…
mpeddada1 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 hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,22 @@ | ||
| ## Coverage Report | ||
|
|
||
| This module gathers aggregated jacoco test coverage metrics across the `gax-java` and `showcase` modules. The purpose of | ||
| the metrics is to provide insights into how much of GAX code is being exercised by showcase and GAX tests and where | ||
| (unit tests versus integration tests). They will also provide information on any change in coverage observed | ||
| as showcase tests continue to be added to the repository. | ||
| This module gathers aggregated jacoco test coverage metrics across the `api-common`, `gax-java` and `showcase` modules. The purpose of | ||
| the metrics is to provide insights into how much of api-common and GAX code is being exercised by showcase, GAX and api-common tests and where | ||
| (unit tests versus integration tests). They will also assist with tracking any changes in coverage as showcase tests continue to be added to the repository. | ||
|
|
||
| ### Unit Test Coverage | ||
| In order to view aggregate unit test coverage of GAX in both `gax-java` and `showcase`: | ||
| In order to view aggregate unit test coverage of api-common and GAX in `api-common`, `gax-java` and `showcase`: | ||
|
|
||
| 1. At the root of the repository, run `mvn clean test -DenableTestCoverage`. | ||
| 2. The metrics can be found at `gapic-generator-java/coverage-report/target/site/jacoco-aggregate/index.html` | ||
|
|
||
|  | ||
|  | ||
|
|
||
| ### Integration Test Coverage | ||
|
|
||
| In order to view aggregate integration test coverage of GAX in both `gax-java` and `showcase`: | ||
| In order to view aggregate integration test coverage of api-common and GAX in `api-common`, `gax-java` and `showcase`: | ||
|
|
||
| 1. At the root of the repository, run `mvn clean verify -DskipUnitTests -DenableTestCoverage -Penable-integration-tests`. | ||
| 2. The metrics can be found at `gapic-generator-java/coverage-report/target/site/jacoco-aggregate/index.html` | ||
|
|
||
|  | ||
|  |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -177,7 +177,6 @@ | |
| </build> | ||
| </profile> | ||
| </profiles> | ||
|
|
||
| <repositories> | ||
| <repository> | ||
| <id>google-maven-central-copy</id> | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.
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.
We have showcase version here and in ci-maven.yaml as well, I'm not very familiar with Github actions, is it possible to configure a shared
SHOWCASE_VERSION?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.
I think it is! According to the docs, shared variables can be created by doing
Settings > secrets and variables > Actions > Manage environments. However, I'm not able to see theSettingstab for this repo so I think it requires some special permissions?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.
If we are going to have hermetic builds, the version needs to be stored in source.
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.
Got it, thank you. Managing the variables in Settings may not be the best solution in that case. I'm inclined to keep the duplicate showcase_versions until an alternate solution becomes available in favor of making the builds self-contained and maintaining visibility into the showcase version we are testing against. Open to hearing more thoughts on this though.