Skip to content

Commit 138c03c

Browse files
committed
chore(31835): add sonarqube job + update configuration
1 parent 0cf8bf9 commit 138c03c

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

.github/workflows/frontend-cli.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,18 @@ jobs:
176176
merge-multiple: false
177177
# Should contain the lcov.info summary, in subdirectory named from the tasks
178178
- run: ls -R ./coverage-combined
179+
180+
sonarqube:
181+
name: SonarQube
182+
needs: [ combine_code_coverage ]
183+
runs-on: ubuntu-latest
184+
steps:
185+
- uses: actions/checkout@v4
186+
with:
187+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
188+
- name: SonarQube Scan
189+
uses: SonarSource/sonarqube-scan-action@v5
190+
with:
191+
projectBaseDir: hivemq-edge-frontend
192+
env:
193+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

hivemq-edge-frontend/sonar-project.properties

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ sonar.sources=./src
1313
# Encoding of the source code. Default is default system encoding
1414
#sonar.sourceEncoding=UTF-8
1515

16+
# Maybe these should be done dynamically in the github action
1617
sonar.javascript.lcov.reportPaths=\
17-
./coverage-report/lcov-vitest.info, \
18-
./coverage-report/lcov-e2e.info, \
19-
./coverage-report/lcov-cpt.info
18+
./coverage-combined/lcov-cypress-Components/lcov.info, \
19+
./coverage-combined/lcov-cypress-E2E/lcov.info, \
20+
./coverage-combined/lcov-cypress-Extensions/lcov.info, \
21+
./coverage-combined/lcov-cypress-Modules/lcov.info, \
22+
./coverage-combined/lcov-cypress-Workspace/lcov.info, \
23+
./coverage-combined/lcov-vitest/lcov.info
2024

2125
# Within the directories defined by sonar.tests, subset of files that will be considered as tests
2226
sonar.test.inclusions=\

0 commit comments

Comments
 (0)