Skip to content

feat(ci): add coverage reports to sonar and github#65

Merged
etiennej70 merged 15 commits into
mainfrom
ci/tests_coverage
Jun 5, 2026
Merged

feat(ci): add coverage reports to sonar and github#65
etiennej70 merged 15 commits into
mainfrom
ci/tests_coverage

Conversation

@etiennej70

@etiennej70 etiennej70 commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

What this PR Provides

  • Code Coverage Integration: Adds comprehensive code coverage reporting to the CI/CD pipeline, enabling teams to track test coverage metrics over time
  • SonarQube Integration: Connects coverage reports to SonarQube for centralized quality and coverage analysis alongside code quality metrics
  • GitHub Coverage Visibility: Automatically publishes coverage reports in GitHub, making coverage data accessible to all developers
  • JaCoCo to Cobertura Conversion: Implements automatic conversion of JaCoCo coverage reports to Cobertura format for broader tool compatibility
  • Enhanced Security: Improves security permissions scope in the CI pipeline for safer automated deployments
  • Upgraded SonarQube Scanner: Updates to the latest SonarQube Maven plugin (v5.7.0) for improved stability and performance

Fixes

  • N/A

Review

The reviewer must double-check these points:

  • The reviewer has verified coverage reports appear correctly in SonarQube and GitHub
  • The CI/CD pipeline runs successfully with the new plugins
  • Security permissions in CI are correctly scoped
  • The JaCoCo to Cobertura conversion produces valid XML output

How to test

  1. Initial state: Working on a feature branch with unit tests
  2. What and how to test:
    • Create a pull request and observe the GitHub Actions workflow (so here)
    • Check that coverage reports appear in the SonarQube dashboard
  3. Expected results:
    • Build succeeds with new plugins
    • target/cobertura.xml file is generated in the build output
    • Coverage metrics are visible in SonarQube
    • GitHub Actions workflow completes without errors

Breaking changes (if any)

  • N/A

Comment thread .github/workflows/basic_code_checks.yml
Comment thread .github/workflows/basic_code_checks.yml Fixed
Comment thread .github/workflows/basic_code_checks.yml Fixed
Comment thread .github/workflows/basic_code_checks.yml Fixed
@github-code-quality

github-code-quality Bot commented Jun 4, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: Java

Java / code-coverage/jacoco

The overall coverage in the branch is 89%. Coverage data for the branch is not yet available.

Show a code coverage summary of the most covered files.
File d8369d8 +/-
com/decathlon/i...ionService.java 100%
com/decathlon/i...serService.java 99%
com/decathlon/i...ionService.java 99%
com/decathlon/i...ateService.java 94%
com/decathlon/i...ateAdapter.java 92%
com/decathlon/i...oOutMapper.java 89%
com/decathlon/i...ionHandler.java 88%
com/decathlon/i...MapperImpl.java 88%
com/decathlon/i...MapperImpl.java 78%
com/decathlon/i...ionService.java 77%

Updated June 04, 2026 16:50 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@etiennej70 etiennej70 marked this pull request as ready for review June 4, 2026 16:46
@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@etiennej70 etiennej70 merged commit 8d1d405 into main Jun 5, 2026
28 checks passed
@etiennej70 etiennej70 deleted the ci/tests_coverage branch June 5, 2026 08:17
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.

3 participants