@@ -57,12 +57,16 @@ jobs:
57
57
mvn clean install -N -DskipTests
58
58
59
59
# Then build and test the jobs-core module with code coverage
60
+ # prepare-agent: Prepare JaCoCo agent for coverage
61
+ # test: Run unit tests
62
+ # report: Generate coverage report
63
+ # surefire-report:report: Generate test report
60
64
cd jobs-core
61
65
mvn clean install \
62
- org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent \ # Prepare JaCoCo agent for coverage
63
- test \ # Run unit tests
64
- org.jacoco:jacoco-maven-plugin:0.8.8:report \ # Generate coverage report
65
- surefire-report:report # Generate test report
66
+ org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent \
67
+ test \
68
+ org.jacoco:jacoco-maven-plugin:0.8.8:report \
69
+ surefire-report:report
66
70
67
71
# Step 5: Generate test summary report
68
72
# This creates a nice test summary in the GitHub UI
@@ -94,11 +98,16 @@ jobs:
94
98
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }} # Authentication token for SonarCloud
95
99
working-directory : jobs-core
96
100
run : |
101
+ # SonarQube analysis with project configuration
102
+ # projectKey: SonarCloud project key
103
+ # organization: SonarCloud organization
104
+ # host.url: SonarCloud URL
105
+ # coverage.jacoco.xmlReportPaths: Coverage report path
97
106
mvn sonar:sonar \
98
- -Dsonar.projectKey=sunbird-lern \ # SonarCloud project key
99
- -Dsonar.organization=sunbird-lern \ # SonarCloud organization
100
- -Dsonar.host.url=https://sonarcloud.io \ # SonarCloud URL
101
- -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml # Coverage report path
107
+ -Dsonar.projectKey=sunbird-lern \
108
+ -Dsonar.organization=sunbird-lern \
109
+ -Dsonar.host.url=https://sonarcloud.io \
110
+ -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
102
111
103
112
# Step 8: Upload Maven repository as artifact
104
113
# This makes the built dependencies available to parallel jobs
0 commit comments