Skip to content

Run Karma coverage before SonarCloud scan (#504) - #505

Open
mudinthewater wants to merge 6 commits into
release/6.0.2from
504-fix-sonarqube
Open

mudinthewater wants to merge 6 commits into
release/6.0.2from
504-fix-sonarqube

Conversation

@mudinthewater

@mudinthewater mudinthewater commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

closes #504

The SonarCloud workflow never ran the test suite, so no coverage report existed when the scanner ran and coverage read 0%. Add Node setup, npm ci, and a Karma run (ChromeHeadlessNoSandbox for CI runners) ahead of the scan, emit lcov from Karma, and point sonar.javascript.lcov.reportPaths at it.

This way when we do new PRs instead of every sonarqube failing (even if it has coverage) it should produce a result.

mudinthewater and others added 4 commits October 20, 2026 22:55
The SonarCloud workflow never ran the test suite, so no coverage
report existed when the scanner ran and coverage read 0%. Add
Node setup, npm ci, and a Karma run (ChromeHeadlessNoSandbox for
CI runners) ahead of the scan, emit lcov from Karma, and point
sonar.javascript.lcov.reportPaths at it.
package-lock.json is gitignored in this repo, so setup-node's
npm cache fails with 'Dependencies lock file is not found' and
npm ci would fail the same way. Use a plain npm install.
# No lock file is committed (package-lock.json is gitignored), so
# neither setup-node's npm cache nor npm ci can be used here.
- name: Install dependencies
run: npm install
# No lock file is committed (package-lock.json is gitignored), so
# neither setup-node's npm cache nor npm ci can be used here.
- name: Install dependencies
run: npm install
Peter Di Pasquale added 2 commits October 20, 2026 23:05
Several imports referenced directories/files with different letter
casing than what exists on disk (frameSummary vs framesummary,
frameAccountability vs frameaccountability, encodingWatch vs
encodingwatch). This resolves fine on case-insensitive filesystems
(e.g. macOS) but fails webpack module resolution on case-sensitive
ones (most Linux distributions), fully blocking the production build.
The default export bound to VistaStyles never existed (MiniCssExtractPlugin
produces no exports for the CSS module) and was never used. Under the
project's ESM output config (experiments.outputModule) webpack treats a
missing default export as a hard build error rather than resolving to
undefined, so this dead import broke the production build entirely.
@mudinthewater

mudinthewater commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

Note this one is failing cause we need to pull in these two PRs first:

The only errors I see are because we didn't pull in these two PRS:
#474
#473

(See I didn't make it up the vista style import does block builds @jvigliotta)

I cherry-picked em into here to verify it works.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@mudinthewater mudinthewater added the Falls-Prio Requested or implemented on behalf of moonfall or skyfall, require review by the openmct dev team label Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Falls-Prio Requested or implemented on behalf of moonfall or skyfall, require review by the openmct dev team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants