-
Notifications
You must be signed in to change notification settings - Fork 758
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
Sonarqube including coverage on each PR. #6111
Conversation
2f50c6d
to
5e3046c
Compare
5e3046c
to
02797a1
Compare
Unsure why this has no coverage marked on it yet; coverage is available in the sonarcloud.io UI. |
Though, given the whole macos thing; I might attempt to use a linux runner and see if it reliably fails, or if the failure rate that caused us to use the macos runner was related to tests that we have since ignored. |
"Build android tests" is now covered by generic tests - we run them as well as build them now. "Run unit tests" is now covered by "Runs all tests" - we combined them with the integration tests. |
Test coverage (even with all the ignored tests) is now at 10% ish - a big improvement on the ~2% we were earlier reporting. |
@@ -18,11 +21,13 @@ def initializeReport(report, projects, classExcludes) { | |||
switch (project) { | |||
case { project.plugins.hasPlugin("com.android.application") }: | |||
androidClassDirs.add("${project.buildDir}/tmp/kotlin-classes/gplayDebug") | |||
androidSourceDirs.add("${project.buildDir}/generated/source/kapt/gplayDebug") |
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.
Without this we have some generated files with coverage percentages but no source to look at. Maybe we should ignore them from the coverage instead?
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 would be for ignoring all generated code (since we're technically not the author~)
Can be a separate PR after clearing our exclusions with the team
Failed at the first attempt. |
02797a1
to
ba109a4
Compare
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.
A few remarks
@@ -12,73 +12,57 @@ env: | |||
-Porg.gradle.parallel=false | |||
|
|||
jobs: | |||
# Build Android Tests | |||
build-android-tests: | |||
name: Build Android Tests |
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.
Can we just disable this job, in case we need to easily enable it again for some reason?
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 can leave it in but commented out; but it will be in github history anyway ?
Have left it in as commented out code.
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.
OK, thanks. Yes, still visible in the git history, but a bit more hidden, so probably quite lost.
I was wondering if something like this exists: if: never()
to disable a job.
property "sonar.projectName", "Element-Android" | ||
property "sonar.projectKey", "im.vector.app.android" | ||
property "sonar.projectName", "element-android" | ||
property "sonar.projectKey", "vector-im_element-android" |
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.
So the Sonar URL has changed? If yes, there are 3 lines to update in the file README.md
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.
Have replaced with newly generated links - the existing ones seemed to be legacy versions
closed/reopened to see if the actions list will resync |
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.
LGTM, can be merged.
e46ea39
to
d18e7ad
Compare
Kudos, SonarCloud Quality Gate passed!
|
Admin-merging through the missing "build android tests" and "run unit tests" as they're now covered by "runs all tests" which handles both unit and connected tests. |
Changes:
Once merged, we'll want to update the list of required checks before merging is OK; at the moment some of the checks are not being run or have been combined; this is global across the project and needs to occur after merging to develop.
After merge I suggest everyone updates their branches against latest develop before attempting a PR merge.
A concern might be usage of the macos runner to get the integration tests running each time. There's not much we can do about that at present.