Skip to content

Commit cdd46f4

Browse files
committed
Updated the sonar analysis into a test step
1 parent 11d6923 commit cdd46f4

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

.github/workflows/Code-Quality-check.yml

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,20 @@ jobs:
156156
reporter: java-junit
157157
fail-on-error: true
158158

159+
- name: Run SonarCloud Analysis for Search
160+
env:
161+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
162+
working-directory: search-api/search-service
163+
run: |
164+
mvn sonar:sonar \
165+
-DCLOUD_STORE_GROUP_ID=${CLOUD_STORE_GROUP_ID} \
166+
-DCLOUD_STORE_ARTIFACT_ID=${CLOUD_STORE_ARTIFACT_ID} \
167+
-DCLOUD_STORE_VERSION=${CLOUD_STORE_VERSION}
168+
-Dsonar.projectKey=Sunbird-Knowlg_knowledge-platform \
169+
-Dsonar.organization=sunbird-knowlg-1 \
170+
-Dsonar.host.url=https://sonarcloud.io \
171+
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
172+
159173
sonar-analysis-content:
160174
needs: test-content
161175
runs-on: ubuntu-latest
@@ -206,39 +220,21 @@ jobs:
206220
-Dsonar.host.url=https://sonarcloud.io \
207221
-Dsonar.coverage.jacoco.xmlReportPaths=taxonomy-api/taxonomy-service/target/site/jacoco/jacoco.xml
208222
209-
sonar-analysis-search:
210-
needs: test-search
211-
runs-on: ubuntu-latest
212-
steps:
213-
- uses: actions/checkout@v3
214-
- name: Set up JDK 17
215-
uses: actions/setup-java@v3
216-
with:
217-
java-version: '17'
218-
distribution: 'temurin'
219-
cache: 'maven'
220-
- name: Run SonarCloud Analysis for Search
221-
env:
222-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
223-
working-directory: search-api/search-service
224-
run: |
225-
run: |
226-
mvn clean verify -DskipTests=false \
227-
-DCLOUD_STORE_GROUP_ID=${CLOUD_STORE_GROUP_ID} \
228-
-DCLOUD_STORE_ARTIFACT_ID=${CLOUD_STORE_ARTIFACT_ID} \
229-
-DCLOUD_STORE_VERSION=${CLOUD_STORE_VERSION}
230-
231-
mvn sonar:sonar \
232-
-DCLOUD_STORE_GROUP_ID=${CLOUD_STORE_GROUP_ID} \
233-
-DCLOUD_STORE_ARTIFACT_ID=${CLOUD_STORE_ARTIFACT_ID} \
234-
-DCLOUD_STORE_VERSION=${CLOUD_STORE_VERSION}
235-
-Dsonar.projectKey=Sunbird-Knowlg_knowledge-platform \
236-
-Dsonar.organization=sunbird-knowlg-1 \
237-
-Dsonar.host.url=https://sonarcloud.io \
238-
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
223+
# sonar-analysis-search:
224+
# needs: test-search
225+
# runs-on: ubuntu-latest
226+
# steps:
227+
# - uses: actions/checkout@v3
228+
# - name: Set up JDK 17
229+
# uses: actions/setup-java@v3
230+
# with:
231+
# java-version: '17'
232+
# distribution: 'temurin'
233+
# cache: 'maven'
234+
239235

240236
comment-pr:
241-
needs: [sonar-analysis-content, sonar-analysis-taxonomy, sonar-analysis-search]
237+
needs: [sonar-analysis-content, sonar-analysis-taxonomy]
242238
if: github.event_name == 'pull_request'
243239
runs-on: ubuntu-latest
244240
steps:

0 commit comments

Comments
 (0)