We’re using the SonarCloud GitHub action as part of our CI process, and I’ve noticed we have a major slowdown specifically for the SonarCloud scan step.
Previously, we had the install, build and test CI steps inside a docker image, and all node_modules were installed in a docker image. At this time, a sonar scan was ~3-4 minutes, which is expected according to this chart.
We refactored the CI a bit, so the install, build and test steps are now done in a GitHub image (/github/workspace
). So, the analysis went from ~3min to ~10-15min:
So, I added these two steps that delete node_modules and dist folders:
And the scan goes back to normal time:
Am I doing something wrong? Adding node_modules
to sonar.exclusions
didn’t really help (I thought it’s excluded by default)