Unverified Commit 7093a785 authored by Dimitri Znaiko's avatar Dimitri Znaiko
Browse files

feat: enable coverage report from the JaCoCo XML report

parent 266f775b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ jacocoTestReport {
    reports {
        // mandatory as it will be read by the pipeline
        csv.enabled true
        // optional for gitlab-ci pipeline yet required if you need sonar analysis
        // required for the code coverage display in merge requests and if you need sonar analysis
        xml.enabled true
    }
}
@@ -127,6 +127,8 @@ The jacoco coverage display in gitlab uses the following variable
| -------------------------- | --------------------------------------------------- | ---------------------- |
| `jacoco-csv-report` / `JACOCO_CSV_REPORT` | Name of report                                          | `jacocoTestReport.csv` |

Additionally, the JaCoCo XML report should be enabled for the code coverage display in merge requests and for the Sonar coverage analysis.

### `gradle-sonar` job — SonarQube analysis

This job is **disabled by default** and performs a SonarQube analysis of your code.
+3 −0
Original line number Diff line number Diff line
@@ -554,6 +554,9 @@ gradle-build:
    reports:
      junit:
        - "$GRADLE_PROJECT_DIR/**/build/test-results/test/TEST-*.xml"
      coverage_report:
        coverage_format: jacoco
        path: "$GRADLE_PROJECT_DIR/**/build/reports/jacoco/**/jacocoTestReport.xml"
    paths:
      - "$GRADLE_PROJECT_DIR/**/build/"