Skip to content

Feature(CS/2020/007): Add SonarCloud analysis with JaCoCo coverage - #10

Merged
AminduBhashana merged 3 commits into
mainfrom
feature/ci-cd-setup/CS-2020-007
Jul 4, 2026
Merged

AminduBhashana merged 3 commits into
mainfrom
feature/ci-cd-setup/CS-2020-007

Conversation

@AminduBhashana

Copy link
Copy Markdown
Contributor

This pull request adds SonarCloud integration for code quality and coverage analysis, and configures the project to generate JaCoCo test coverage reports. The most significant changes are related to build configuration and CI improvements.

Continuous Integration and Code Quality:

  • Added a SonarCloud analysis step to the GitHub Actions CI workflow in .github/workflows/ci.yml, enabling automated code quality checks during builds.

Maven Build Configuration:

  • Updated pom.xml to include SonarCloud properties such as organization, host URL, project key, and the path to the JaCoCo coverage report, ensuring SonarCloud receives the necessary metadata and coverage data.
  • Added the jacoco-maven-plugin to pom.xml to automatically generate code coverage reports during the test phase, which are then used by SonarCloud.

Test Plugin Configuration:

  • Modified the maven-surefire-plugin configuration in pom.xml to use a more flexible argLine syntax, improving compatibility with code coverage tools.

@AminduBhashana AminduBhashana self-assigned this Jul 4, 2026
@AminduBhashana AminduBhashana added feature new feature CSCI 44092 CSCI 44092 Enterprise Application Development Group Project order-service Handles order creation labels Jul 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds SonarCloud integration to the CI pipeline and configures Maven to produce JaCoCo coverage reports so SonarCloud can ingest coverage and quality metrics for the order-service project.

Changes:

  • Added SonarCloud project metadata and JaCoCo XML report path to Maven properties.
  • Configured jacoco-maven-plugin and updated Surefire argLine to support coverage agent injection.
  • Extended the GitHub Actions CI workflow to run SonarCloud analysis.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pom.xml Adds SonarCloud properties, configures JaCoCo plugin, and adjusts Surefire argLine for coverage tooling.
.github/workflows/ci.yml Adds a SonarCloud analysis step to CI after build/test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml

@GLRandula GLRandula left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Built successfully

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2026

Copy link
Copy Markdown

@AminduBhashana
AminduBhashana merged commit 61b555b into main Jul 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSCI 44092 CSCI 44092 Enterprise Application Development Group Project feature new feature order-service Handles order creation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants