Skip to content

Commit 5c896b4

Browse files
author
Umutcan ÖNER
committed
ci: integrate SonarQube analysis into build workflow and update project configuration
1 parent af38f2f commit 5c896b4

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
name: Build
2626

2727
on:
28+
push:
29+
branches:
30+
- develop
2831
pull_request:
2932
branches: [main]
3033

@@ -181,3 +184,15 @@ jobs:
181184
with:
182185
name: bundle-analysis
183186
path: apps/**/.next/analyze/*.html
187+
188+
sonarqube:
189+
name: SonarQube
190+
runs-on: ubuntu-latest
191+
steps:
192+
- uses: actions/checkout@v4
193+
with:
194+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
195+
- name: SonarQube Scan
196+
uses: SonarSource/sonarqube-scan-action@v5
197+
env:
198+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,9 @@
3838
"typescript:S1848": {
3939
"level": "off"
4040
}
41+
},
42+
"sonarlint.connectedMode.project": {
43+
"connectionId": "SonarCloud",
44+
"projectKey": "zopiolabs_zopio_test_fork"
4145
}
4246
}

sonar-project.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# This file configures how SonarCloud analyzes the Zopio monorepo
33

44
# Required: Organization and project keys (update with your actual values)
5-
sonar.organization=zopio
6-
sonar.projectKey=zopio_zopio
5+
sonar.organization=zopiolabs
6+
sonar.projectKey=zopiolabs_zopio_test_fork
77

88
# Project metadata
9-
sonar.projectName=Zopio
9+
sonar.projectName=zopio_test_fork
1010
sonar.projectVersion=0.9.0
1111

1212
# Source code configuration

0 commit comments

Comments
 (0)