Skip to content

Commit 2fa7c96

Browse files
authored
#SBCOSS-519 feat: adding github actions to run testcases and codequality checks for data-pipeline flink jobs
1 parent e4aef37 commit 2fa7c96

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/pr-actions.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,16 @@ jobs:
5757
mvn clean install -N -DskipTests
5858
5959
# 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
6064
cd jobs-core
6165
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
6670
6771
# Step 5: Generate test summary report
6872
# This creates a nice test summary in the GitHub UI
@@ -94,11 +98,16 @@ jobs:
9498
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Authentication token for SonarCloud
9599
working-directory: jobs-core
96100
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
97106
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
102111
103112
# Step 8: Upload Maven repository as artifact
104113
# This makes the built dependencies available to parallel jobs

0 commit comments

Comments
 (0)