Skip to content

CI: add SonarQube analysis workflow + Codecov badge#24

Merged
HandyS11 merged 1 commit into
developfrom
feat/sonar-workflow
Jun 22, 2026
Merged

CI: add SonarQube analysis workflow + Codecov badge#24
HandyS11 merged 1 commit into
developfrom
feat/sonar-workflow

Conversation

@HandyS11

Copy link
Copy Markdown
Owner

Summary

Adds a SonarQube analysis workflow and a Codecov coverage badge.

  • .github/workflows/Sonar.yml — runs dotnet-sonarscanner on pushes to develop and via workflow_dispatch.
    • Community-Edition Sonar has no branch/PR decoration, so analysis is intentionally scoped to the long-lived develop branch; PR build/test feedback stays in CI.yml.
    • fetch-depth: 0, JDK 17 (zulu), and scanner caching per Sonar requirements.
    • Build and test run in Release with an explicit dotnet restore --no-restore flow to mirror CI.yml.
    • Coverage collected via coverlet (opencover format) and uploaded to Codecov (coverage + test results).
  • README.md — adds the Codecov badge.

Notes

  • Exclusions are scoped to the directories that actually exist (**/tests/**); no samples/ directory exists in this repo.
  • Requires repo secrets: SONAR_PROJECT_KEY, SONAR_TOKEN, SONAR_HOST_URL, CODECOV_TOKEN.
  • On the first develop run, confirm the scanner end-step log shows it parsed the OpenCover report (validates the coverage path resolves).

🤖 Generated with Claude Code

Add Sonar.yml running dotnet-sonarscanner on develop pushes (and
workflow_dispatch). Community-Edition Sonar has no branch/PR support,
so analysis is scoped to the long-lived develop branch; PR build/test
feedback stays in CI.yml.

Build/test run in Release with an explicit restore to mirror CI.yml,
coverage is collected via coverlet (opencover) and uploaded to Codecov.
Add the Codecov badge to the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HandyS11 HandyS11 merged commit 0ea3724 into develop Jun 22, 2026
3 checks passed
@HandyS11 HandyS11 deleted the feat/sonar-workflow branch June 22, 2026 23:20
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