Skip to content

ci: SonarCloud analysis from CI, like the other craft repos - #2

Merged
dylanmtaylor merged 3 commits into
mainfrom
ci/sonarcloud-workflow
Nov 11, 2026
Merged

dylanmtaylor merged 3 commits into
mainfrom
ci/sonarcloud-workflow

Conversation

@dylanmtaylor

@dylanmtaylor dylanmtaylor commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Moves this project from SonarCloud's automatic analysis to the shared craft-common-actions SonarCloud workflow, as the other repos use. Main and pull requests are then analysed on every push, instead of whenever automatic analysis next runs (it last ran here on 2026-11-10).

  • .github/workflows/sonarcloud.yml: the same caller as craft-i18n. There's no Cargo.toml, so the shared workflow skips its Rust coverage jobs and only scans.
  • sonar-project.properties: project key and organization, `src` as sources and `test` as tests, and coverage excluded, because CI publishes no JS/TS coverage report and new code would otherwise always read 0%.

⚠️ Before merging, turn off Automatic Analysis for storytold_discord-github-ticket-relay in SonarCloud (Administration › Analysis Method). While it's on, SonarCloud rejects CI scans, so this PR's own SonarCloud check fails until then.

Coverage (updated): this PR now publishes real coverage instead of excluding it. The workflow runs npm run test:coverage through the shared workflow's new node-coverage-script input (storytold/craft-common-actions#194), and sonar.javascript.lcov.reportPaths points at the lcov report. Locally that comes to 79.0% line coverage over 131 source files (vitest with `@vitest/coverage-v8`). Until #194 merges, the workflow points at its branch (@sonarcloud/node-coverage), and it goes back to @main before this merges.

@dylanmtaylor
dylanmtaylor merged commit 9374091 into main Nov 11, 2026
7 checks passed
@dylanmtaylor
dylanmtaylor deleted the ci/sonarcloud-workflow branch November 11, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant