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

Restore Jest sonar reporter and bump workflow timeout #1840

Merged
merged 2 commits into from
Nov 1, 2023
Merged

Conversation

awharn
Copy link
Member

@awharn awharn commented Oct 30, 2023

What It Does
Restore Jest-Sonar scans and increase workflow timeout

How to Test

Review Checklist
I certify that I have:

Additional Comments

Copy link
Member

@gejohnston gejohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your continued efforts to keep this stuff running.

Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @awharn!

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!.

Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM.
I had one comment/question

@@ -134,6 +134,7 @@ module.exports = {
}],
["github-actions", { "silent": false } ]
],
"testResultsProcessor": "jest-sonar-reporter",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the "jest-sonar-reporter" be added to the reporters list above?

I'm kind of worried about the testResultsProcessor property, since it had a tendency to override some reporters (probably in older versions of jest). IDK if you remember, but that's why Dan's jest-stare reporter had a list of additionalReporters where we had the jest-junit and jest-sonar.

If this is not something to be concerned about in newer versions of Jest, then I'm fine with leaving it as-is.

Copy link
Member Author

@awharn awharn Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that and it doesn't work. jest-sonar-reporter does not support the newer interface, and has been archived since 2019. Nothing else seems to exist outside of beta for providing Jest results to Sonar, so either we need to add this back, add something else to do a sonar scan on top of Jest tests (only thing I saw was in jest-sonar with a version of 0.2.1), or drop the use of Sonar.

@@ -80,5 +81,8 @@
"ts-jest": "^29.0.0",
"typedoc": "^0.23.10",
"typescript": "^4.0.0"
},
"jestSonar": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add the jest-sonar-reporterto the reporters list, we can move this configuration item there too 😋

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, tried that, Jest threw errors because the jest-sonar-reporter API wasn't compatible.

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@zFernand0
Copy link
Member

Seems like the reporter doesn't support the new syntax. 😢
Thanks for clarifying! LGTM! 😋

@zFernand0 zFernand0 merged commit 597b730 into master Nov 1, 2023
20 checks passed
@zFernand0 zFernand0 deleted the fix-sonar branch November 1, 2023 13:23
@zFernand0 zFernand0 added the release-current Indicates that there is no new functionality being delivered label Nov 1, 2023
@zFernand0 zFernand0 mentioned this pull request Nov 1, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog release-current Indicates that there is no new functionality being delivered
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants